Jump to content
Sign in to follow this  

[Question] ScrollDownGUI

Recommended Posts

Take a look at.

_GUICtrlEdit_Scroll($hWnd, $iDirection)
_GUICtrlRichEdit_ScrollLines($hWnd, $iQlines)

_GUICtrlRichEdit_ScrollLineOrPage($hWnd, $sAction)

The help file is full of various ways to accomplish that.

_GUICtrlEdit_AppendText($hWnd, $sText)

May scroll to the bottom automatically as well... I can't remember.

Share this post

Link to post
Share on other sites

Ok thanks for reply's

but the problem was.

let giv my scirpt a part:

$edit = GUICtrlCreateEdit("[" & $Time & "]" & " #### at"& @CRLF & "[" & $Time & "]" & " ####", 16, 200, 217, 46, $WS_VSCROLL + $ES_READONLY + $ES_AUTOVSCROLL)

And then (if button is pressed)

If $x=1 Then
guictrlsetdata($edit,guictrlread($edit)&  @CRLF & "[" & $Time & "]" & " Started" )

But how i he autoscroll down, when new line is set?

Thanks!! already

Zanax ;)

Share this post

Link to post
Share on other sites

#include <WindowsConstants.au3>
#include <EditConstants.au3>
$Time = "3:45PM"
$GUI = GUICreate("Title", 300, 300)
$Edit = GUICtrlCreateEdit("[" & $Time & "]" & " #### at"& @CRLF & "[" & $Time & "]" & " ####", 0, 0, 300, 300, $WS_VSCROLL + $ES_READONLY + $ES_AUTOVSCROLL)

While 1
    GUICtrlSetData($Edit, "Alright" & @CRLF, 1)

The above script scrolls properly... The only difference I see is that your not using the last parameter in

GUICtrlSetData()... Which should be set to "1" which will actually "append" the text. As shown in the help-file.

GUICtrlSetData ( controlID, data [, default] )

default [optional]

Combo, List: The default value.

Edit, Input: If non-empty (""), the string is inserted at the current insertion point (caret).

Edited by BinaryBrother

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...