Source language: Translate to:

ListBox Question

NeoBook tips, tricks, code samples and more...

Moderator: Neosoft Support

ListBox Question

Postby Jim Brammer » Thu Feb 07, 2002 5:31 pm

Listbox Question

Hi all, OK here is a question regarding list boxes.

If I add text to a list box at the END of the list, the list does not focus on the latest entry. How can I do that ? It is tedious for me to Scroll down a hugh list just to see the latest entry.

The only way I have figured is to add the data at line 1. This writes the data at the top of the list with the most uptodate entry. This is the reverse of what I want.

Anyone know how to make the list box focus the last entry everytime there is an addition to the list ?



Here is how I do it.

First you need to know the value (name) of the last item in your listbox or the number of it if of it if you choose to select items by number. (You can use listboxsize to get last number)

Then use SetVar to set the value of the listbox variable to the value (name) of the last item.

SetVar "[ListBox1]" "MyLastItem"
SetVar "[ListBox1]" "22"

Sometimes you may need to set the value back to null
SetVar "[ListBox1]" ""
and then use another SetVar to get it to move again.
If this does not work for you, maybe you can send me your file and I will see what might work.

Jim Brammer

Return to NeoBook Knowledgebase

Who is online

Users browsing this forum: No registered users and 2 guests