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

RE: TextBox and vertical scroll bar by MortenWennevik

MortenWennevik
Fri Dec 14 01:44:00 PST 2007

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.


--
Happy Coding!
Morten Wennevik [C# MVP]


"Alexander Vasilevsky" wrote:

> 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
>
>
>