CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2001
    Posts
    342

    Scrolling listbox selected item into view

    In a listbox, I select one of the items programatically. It works, but that item doesn't scroll up into view.

    How do I force the selected item to scroll into view?

    Code:
    		int i = m_listbox.FindStringExact(-1,str);
    		m_listbox.SetSel(i,TRUE);
    		m_listbox.SetCaretIndex(i);
    thanks.

  2. #2
    Join Date
    Sep 2002
    Location
    14° 39'19.65"N / 121° 1'44.34"E
    Posts
    9,815
    SetTopIndex().

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured