Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Scrolling a List Box

zenboyzenboy Member Posts: 26
I have a small modeless dialog box with a list box control in it. I'm adding text strings to it as the main application processes a few things. I'm looking for a way to scroll the list box to the bottom as strings are added. Its working pretty much like the output pane in VC++, with the exception that I can't get it to automatically scroll down as strings are added. I've tried to use ScrollWindowEx() and SetScrollInfo(), but I can't seem to get them to work. The best I've managed so far is to get the scroll bar to move, but not the actual list box "view"

Does anyone have a code example of ScrollWindowEx(), ( or am I trying to use the wrong thing )

Any Ideas ???

Comments

  • pingpongpingpong Member Posts: 937
    Hope this is what you need... After you insert stuff at the end of the dialog, call this:

    pListBox->SetTopIndex(pListBox->GetCount()-1);


    : I have a small modeless dialog box with a list box control in it. I'm adding text strings to it as the main application processes a few things. I'm looking for a way to scroll the list box to the bottom as strings are added. Its working pretty much like the output pane in VC++, with the exception that I can't get it to automatically scroll down as strings are added. I've tried to use ScrollWindowEx() and SetScrollInfo(), but I can't seem to get them to work. The best I've managed so far is to get the scroll bar to move, but not the actual list box "view"
    :
    : Does anyone have a code example of ScrollWindowEx(), ( or am I trying to use the wrong thing )
    :
    : Any Ideas ???
    :
    :

  • zenboyzenboy Member Posts: 26
  • Justin BibJustin Bib USAMember Posts: 0

    ____ // http://forcoder.org // free ebooks and video tutorials about | Visual Basic .NET Assembly PHP R Python Delphi Swift C++ Objective-C Ruby C# Perl Go Java Scratch MATLAB C PL/SQL Visual Basic JavaScript Lisp Kotlin SAS Alice Prolog Ada Dart F# Rust Lua Awk Hack FoxPro ABAP Transact-SQL ML LabVIEW Clojure Crystal Erlang Scala COBOL VBScript Fortran Logo Scheme D Julia Bash Apex | ____

Sign In or Register to comment.