Shift Focus on ListBox Items...

T

Thunder$truck

I'm sure this is easy but I can't figure it out.

I use a ListBox for my application log and each time the app performs
a task an entry is added into the ListBox.

When the list box becomes full, a vertical scrollbar is automatically
added to the ListBox. As more and more entries are added to the
ListBox it becomes a chore to continually have to manually scroll down
to see the new entry.

How can I force the vertical scrollbar to move along with the
entries? This way my users don't have to keep scrolling down to see
the new entries added to the ListBox?

As far as I can tell I can specify a SelectedItem but I'd have to
specify the Item number and since entries are constantly being added
this is not prudent.


Thanks
T$
 
O

One Handed Man \( OHM - Terry Burns \)

Why not just use a multi line text box instead and pre-pend the text, this
way last entry is at the top.
 
S

Sriram Krishnan

Well - this may sound a bit retro - but what about doing a quick
P/Invoke and using one of the WM_ scroll messages?

Sriram
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top