CListBox
-
I am using CListBox::SetTopIndex() to make sure I can view the last entry in a list box. I would like the view to adjust so the last entry is shown about half way between the top of the bottom of the list box control. I created a quick formula to do this, however, I found that using SetTopIndex() will make the last entry visible, but no matter what I put as the index for SetTopIndex(), it always puts the last entry at the bottom of the list box control. Visible yes, what I want, no. Any ideas? Thanks John
-
I am using CListBox::SetTopIndex() to make sure I can view the last entry in a list box. I would like the view to adjust so the last entry is shown about half way between the top of the bottom of the list box control. I created a quick formula to do this, however, I found that using SetTopIndex() will make the last entry visible, but no matter what I put as the index for SetTopIndex(), it always puts the last entry at the bottom of the list box control. Visible yes, what I want, no. Any ideas? Thanks John
Do I understand correctly, you want the last item entered into a list box to be displayed centered vertically? There are no other entries in the list box below this one? If this is what I understand then you can't. What you may have to do is add empty strings to pad the listbox and move the item up.