Prevent scrollbar from jumping down when viewing a list?
Hi - I'm making a chat room in windows forms and have a listbox that displays all the messages recieved, ofcourse I have the chatbox set to automatically scroll to the bottom when a new item is sent. However, if the user is looking at old messages and a new item is sent, the scroll bar immediately jumps to the bottom.
I was thinking that I could do something like if(scrollBarPosition > scrollBarBottom) doNotJumpToBottom
except I can't seem to find any scroll bar position variable.
This is my jump to the bottom code:
0 Replies