04-04-2011 03:11 PM
I have resized listBox to display only one entry of char* items. As there is only one item displayed vertical scrollbar is not visible. Is there a way to show the scrollbar when listbox display is sized to show only one item?
Using up/down arrow it does scroll through other entries.
04-04-2011 03:39 PM
Sorry the last line where I said that the up/down arrow helps scroll through the items is not true as listbox is a indicator and not control.So currently there is not way to scroll through the listbox.
04-05-2011 12:31 AM
If your listbox is an indicator, you would not be able to use scrollbars... So what is the purpose of scrollbars?
04-05-2011 03:11 AM
You can always make your own scroll buttons.
Just add two picture buttons next to your listbox and put some arrow icons on them.
All you need to do is get the current selected index, increment/decrement it and set it back.
04-05-2011 03:11 AM - edited 04-05-2011 03:13 AM
// PLEASE REMOVE
04-05-2011 10:01 AM
lvrat:
If you want to display only one item but give the operator the ability to scroll through other items, you might do better using a Ring instead of a Listbox. Leave it as a control (e.g. Hot or Normal) and not an Indicator, or you'll lose the scrollbar-like increment/decrement arrows. You have as much control in your code over a Control as you do an Indicator: you can still set the value and control what is displayed.
04-06-2011 02:47 PM
The only problem using ring instead of listbox is that when there is a lot of items it pulls down the ring and hids all the other GUI items behind it.
Real estate was one reason of using list box and displaying one value. I did change the list box as a control instead of indicator but still cant get the scrollbar funcitonality.
ANy other suggestion, thanks!
04-06-2011 02:59 PM
The reason is your choice of one line only.
What is still possible even for one visible line is operating the listbox with the up and down arrows of your keyboard.
04-07-2011 06:23 AM
see also here
04-07-2011 05:40 PM
Hi dear all.
I would like to know how can i make listbox wich elements are combobox or enum variables? If sombody has alredy dan that please send me example or code.
thenks a lot