Hide ScrollBar of TextBox

  • Thread starter Thread starter Palm Kevin
  • Start date Start date
P

Palm Kevin

Hi,
I need absolutely your help.

I need to have a multiline-textbox that shows the scrollbars ONLY when
there is too much text to be displayed in the box. (Only vertical);


When doing so :
textbox.ScrollBars = ScrollBars.Vertical
then the scrollbars is ALWAYS visible, even if the scrollbar is not
usefull...

A possiblity could be to measure the text heigth of the textbox-content
with the Graphics.measureMeasureString(string,Font).
But the problem is that the Textbox breaks a string when it is too long
for its container. Therefore it is not possible to measure the
text-height of the string (actually it depends on the textbox-width...)

Thanks beforehand,
Kevin
 
Sorry, the behavior of showing a disabled vertical scrollbar is the way the
native edit control works. I can't think of a way to outsmart it, or to
tell when the scrollbars become enabled.



NETCF Beta FAQ's -- http://www.gotdotnet.com/team/netcf/FAQ.aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top