Problem With ListBox Horizontal Scrollbar
-
Dear all, I have add a listbox with following property on listbox1.DrawMode=OwnerDrawVariable; listbox1.HorizontalScrollbar=true; listbox1.ScrollAlwaysVisible=true; I am overriding the DrawItem event of the ListBox for drawing item's text. Some text are too big to fit in the list box. But the Horizontal Scrollbar is not enabled or working. Horizontal scrollbar is visible and [disable or dim]. Vertical scrollbar is working fine. Please help.
-
Dear all, I have add a listbox with following property on listbox1.DrawMode=OwnerDrawVariable; listbox1.HorizontalScrollbar=true; listbox1.ScrollAlwaysVisible=true; I am overriding the DrawItem event of the ListBox for drawing item's text. Some text are too big to fit in the list box. But the Horizontal Scrollbar is not enabled or working. Horizontal scrollbar is visible and [disable or dim]. Vertical scrollbar is working fine. Please help.
Hello Listboxes implement auto horizontal scroll by default. Why do you do all this?? Once you input an item that has a long enough text, the horizontal scrollbar should appear with the proper size!! If you want to set this manually -for one reason or the other- don't forget to set
ListBox.HorizontalExtent
to the right size.Regards:rose:
-
Dear all, I have add a listbox with following property on listbox1.DrawMode=OwnerDrawVariable; listbox1.HorizontalScrollbar=true; listbox1.ScrollAlwaysVisible=true; I am overriding the DrawItem event of the ListBox for drawing item's text. Some text are too big to fit in the list box. But the Horizontal Scrollbar is not enabled or working. Horizontal scrollbar is visible and [disable or dim]. Vertical scrollbar is working fine. Please help.
Thanks Nader, My Problem has resolved. I was not using HorizontalExtent. Now i realize this is important property. So very very thanks. Now I have a samll question too. What is the easiest way to give a shortcut key to a Button in C#. Like Ctrl+S or F6 etc. Thanks...