Horizontal scrolling in list box
-
Hi I have a list box in my program that insert some string into it with C# code. Sometimes length of string is more than width of list box, but horizontal scroll bar doesn't appear in list box. Do you know solution of my problem ?
Best Regards, Reza Shojaee
-
Hi I have a list box in my program that insert some string into it with C# code. Sometimes length of string is more than width of list box, but horizontal scroll bar doesn't appear in list box. Do you know solution of my problem ?
Best Regards, Reza Shojaee
-
Hi I have a list box in my program that insert some string into it with C# code. Sometimes length of string is more than width of list box, but horizontal scroll bar doesn't appear in list box. Do you know solution of my problem ?
Best Regards, Reza Shojaee
The simplest solution is to set ListBox.HorizontalScrollBar = true
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
-
set the HorizontalScrollBar property of list is true
If you can think then I Can.
modified on Saturday, March 13, 2010 4:40 AM
You could indeed put the ListBox into a panel with scroll bars on the panel, but unless you make the ListBox either arbitrarily wide, or monitor the length of your strings and modify the ListBox appropriately, you can still run into the problem the OP describes, as the panel will not create scroll bars based on the ListBox content. Try it - you will see what I mean! The simplest solution is to set ListBox.HorizontalScrollBar = true
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy