Hi
I have a simple 1 column list box and I want to programmatically select an item
just after appending it to the listbox.
It works well when all items (including the newly appended item) are visible.
But if the list grows beyond the number of visible rows, the added items cannot
be selected. With a mouse-click, they can be selected but not highlighted.
I'm using:
var li = myListBox.appendItem(newName, newId);
// myListBox.ensureElementIsVisbible(li);
> // myListBox.scrollToIndex(myListBox.getIndexOfItem(li));
myListBox.selectedItem = li;
I've tried but haven't had any luck with ensureElementIsVisible() and
scrollToIndex() (commented above) either.
Any suggestions?
- Soyapi
--
Soyapi Mumba
http://soyapi.blogspot.com
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners