Sign in to follow this  
Followers 0
ZanaxNL

[Question] ScrollDownGUI

6 posts in this topic

Hey,

Which command i need to automatic scroll down when a new line is set in a GuiCreateEDIT ?

Thanks : )

Zanax

Share this post


Link to post
Share on other sites



You need the $ES_AUTOVSCROLL style set on the edit.

I was looking for that... Yea, that's definitely the best way... Posted Image

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" )
endif

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

Thanks!! already

Zanax ;)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

#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)
GUISetState(@SW_SHOW, $GUI)

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

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  
Followers 0