Sign in to follow this  
Followers 0
Krypton88

Making a list box scroll TO the bottom?!?! Help please!

4 posts in this topic

Hye all I have a great project im working on, It uses a an Input as a command prompt and a "GUICtrlList" for the data to show up in, But when the list box shows enough data to where it has a scroll bar it wont go to the newest added Strings, How do I make it so you can see the newly added string in the list box..(The bottom) It has a scroll bar and all but it just says to the top and you have to manually look to see if the command was correct or not... Anyone pleas ehelp with this. Ive searcha dn found nothing On this topic. Thanks Alot!

BTW, Im using _GUICtrlList_AddString() for the new data to be added to the list box,

Share this post


Link to post
Share on other sites



Hye all I have a great project im working on, It uses a an Input as a command prompt and a "GUICtrlList" for the data to show up in, But when the list box shows enough data to where it has a scroll bar it wont go to the newest added Strings, How do I make it so you can see the newly added string in the list box..(The bottom) It has a scroll bar and all but it just says to the top and you have to manually look to see if the command was correct or not... Anyone pleas ehelp with this. Ive searcha dn found nothing On this topic. Thanks Alot!

BTW, Im using _GUICtrlList_AddString() for the new data to be added to the list box,

Something like this:

#include <GUIListBox.au3>
HotKeySet("{ENTER}","SendLine")
Global $LIST
$GUI = GUICreate("EXAMPLE",200,230)
$LIST = GUICtrlCreateList("",5,5,190,190,BitOR(0x00100000,0x00200000))
$INPUT = GUICtrlCreateInput("",5,200,190,20)
GUISetState(@SW_SHOW,$GUI)

While 1
    $MSG = GUIGetMsg()
    If $MSG = -3 Then Exit
    Sleep(20)
WEnd

Func SendLine()
    _GUICtrlListBox_AddString($LIST,GUICtrlRead($INPUT))
    $LAST = _GUICtrlListBox_GetCount($LIST)
    _GUICtrlListBox_SetCaretIndex($LIST,$LAST)
    GUICtrlSetData($INPUT,"")
EndFunc

When the words fail... music speaks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0