|
-
Jan 4th, 2010, 10:33 AM
#1
Thread Starter
Addicted Member
-
Jan 4th, 2010, 11:18 AM
#2
Re: Auto scroll to bottom of Combobox?
Default behavior is that the combobox scroll's to show the selected item.
If you wish to modify the height of the dropdown box, look at this thread
If you still wish to scroll to the bottom you have two choices
1) Set the ListIndex = ListCount-1, but that will change the user's selection and not user-friendly
2) In the combo's DropDown event, locate the actual dropdown window via FindWindow API (a separate window and is not the combobox hWnd). Then send it a WM_VScroll message with the SB_Bottom flag to force scroll bar to bottom.
Edited: Another option is to add your combobox items in reverse order, newest at the top?
Last edited by LaVolpe; Jan 4th, 2010 at 11:33 AM.
-
Jan 4th, 2010, 11:40 AM
#3
Thread Starter
Addicted Member
Re: Auto scroll to bottom of Combobox?
I set the ListIndex to ListCount-1.
It works for me in my case because I have added it just before the program adds some text to the text window of the combobox before the user has input. So the user sees the list scrolled to the bottom.
Thanks LaVolpe
"And then one day you find, ten years have got behind you.
No one told you when to run, you missed the starting gun."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|