views:

217

answers:

1

Well I am trying to autoscroll my ListBox or display everything the opposite way just like a shoutbox.

Please post the code here on how to do it. I have tried many ways but they either gave me errors or didn't work.

A: 

Just usethe ListBox.TopIndex property.

Here's the help for it:

http://msdn.microsoft.com/en-us/library/system.windows.forms.listbox.topindex.aspx

Or otherwise you could just insert the new items on the top rather than the bottom.

As a general tip though, if you're having problems getting the ListBox to do what you need, it might be worth using a ListView in details mode instead.

ho1
How can I insert new items at the top?
xZerox
Off the top of my head and assuming the `ListBox` is called list I think it would be something like `list.Items.Insert(0, YourStringOrObject)`
ho1