Link to home
Start Free TrialLog in
Avatar of sllsgl
sllsgl

asked on

CListBox Vertical Scroll Bar Auto-Scroll?

Can anyone tell me how to make ListBox Vertical scroll bar automatically scrolled down to the latest item added just like the way edit box does to its incoming data?
ASKER CERTIFIED SOLUTION
Avatar of Tommy Hui
Tommy Hui

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sllsgl
sllsgl

ASKER

I have to try it out, thui, earlier 2 helpful guys suggested using SetCurSel(), I have yet to test all these out.  Wait for my outcome :)

Anyway, thanks alot :)
Avatar of sllsgl

ASKER

Hi, thui, SetCaretIndex() is the right way :)  For the 2nd parameter, using FALSE is better as the whole item can be  visible, making the effect "Auto VScroll" better :)
Using TRUE may sometimes show the added item only partially.
Anyway, it's a good answer many ppl is looking forward to.