TextBox and vertical scroll bar

  • Thread starter Thread starter Alexander Vasilevsky
  • Start date Start date
A

Alexander Vasilevsky

Say please, can we adjust TextBox so that the multiline = true when there
was no vertical scroll line until it is not necessary? (Now there is a
vertical scrolling, but in an inactive state). Ie to do so, as in
RichtextBox default.

http://www.alvas.net - Audio tools for C# and VB.Net developers + Christmas
discount
 
Hi Alexander,

I'm assuming you are saying you want the scrollbar in a regular TextBox to
be hidden until needed. And maybe also have Multiline automatically enabled
if a (vertical?) scrollbar is enabled.

As for the first one, this behaviour already exists in RichTextBox, like you
said, so you are free to use RichTextBox instead of a regular TextBox
(although the RichTextBox could do with a rendering overhaul for BorderStyle).

I agree with you that setting a scrollbar should set Multiline = true as
well, it makes no sense having scrollbars in a single line TextBox or
RichTextBox. And for RichTextBox, it does not make sense to have space for
more than one line if Multiline is set to false. But none of this breaks the
controls in any way so I doubt this will be changed, especially since WPF
will more or less be taking over.
 
Back
Top