multiline textbox with scrollbars on demand
Posted on 2002-06-05
I'm trying to find a way to dynamically change a textbox control array so that some textboxes are multiline with scrollbars and some are single-line without scrollbars.
Since the Multiline property cannot be changed at run-time, I simply disable the Enter key for single-line mode.
Now I realized that I may need to allow more lines than the display supports and would like to add vertical scroll bars only in multiline mode.
Since scrollbars are also read-only at run-time, I can't change them. If I have a "single-line" textbox with multiline on, the scrollbar remains but is grayed out.
Can I create a textbox that lets me dynamically change between single-line and multi-line, and only shows scrollbars in multi-line mode.
...or is there another control that supports this?
...or maybe I should simply spend a few weeks writing my own???