I don’t want that you can select items in my listbox, so I defined it as follows:
[xml]<control name=“listBox” id=“chatarea” vertical=“optional” horizontal=“optional” selectionMode=“Disabled” displayItems=“10” />[/xml]
However, I can still select items. Is this a bug or intended?
Also another question:
Can I somehow get auto-scrolling for the vertical scrollbar? Meaning that it automatically scrolls down when a new item is added and when it is on the bottom?
What you’re seeing is not a selection, it’s a highlight… I’m also having this behavior and it’s “normal”.
If you ask me, I’d also prefer if it’d do nothing when clicking on it.
If you use Single or Multiple then click on it you’ll see the difference. Also, if IIRC if the control is set to Disabled it will not trigger an event.
Again it’s just “highlighting”…
Ok, does anyone know anything about the auto-scrolling?
I figured it out. You have to do:
[java]yourListBox.showItemByIndex(yourListBox.itemCount() - 1);[/java]
madjack is right, there is a difference between actually selecting an item and hovering it. you can disable the hovering in the style file for the listbox. if you take a look into the nifty-listbox-style.xml in the nifty-style-black project, you will find that line:
[xml]<onHover name="colorBar" color="#444f" post="false" neverStopRendering="true" timeType="infinite" inset="1px"/>[/xml]
if you would remove that line there would be no visual representation of the hovering of elements.