[Gambas-user] ListBox, how to auto-follow last added item.?
timothy
timothy.marshal-nichols at ...247...
Mon Jan 29 09:41:56 CET 2007
>
> Hi. The only way seems to be adding the last item on top of the
listbox.
> Try the attached example (Gambas 1.9.47)
>
> Ciao.
>
1) Adding an item to at the end of the list does work:
ListBoxLog.Add("New Item")
ListBoxLog.Index = ListBoxLog.Count - 1
2) There is a simpler way of adding an item at the top of a list than
your example. The Add method takes an optional Index parameter. So you
could use:
ListBoxLog.Add("New Item", 0)
ListBoxLog.Index = 0
To add the item at the top of the list and ensure it is visible.
Thanks
8-{)} Timothy Marshal-Nichols
<mailto: timothy.marshal-nichols at ...247...>
More information about the User
mailing list