Sign in to follow this  
Followers 0
VIP

GUICtrlSetData ONLY insert ? Not clear old data ?

4 posts in this topic

#1 ·  Posted (edited)

#include <GUIConstants.au3>

Global $EditBufSize = 281474976710656

$MainGUI = GUICreate("Test", 620, 300 )
$GUI_Log=GUICtrlCreateEdit ("", 20,20,600,200, BitOR($ES_NOHIDESEL,$ES_AUTOVSCROLL,$ES_READONLY, $WS_HSCROLL,$WS_VSCROLL, $ES_MULTILINE))

GUISetState ()
    GUICtrlSetData ($GUI_Log, "Hello" & @CRLF,1)
    GUICtrlSetData ($GUI_Log, "World" & @CRLF,1)
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
    EndSelect
WEnd

Exit 

Why "Hello" not Delete ?

 

Edited by Trong

Regards,
 

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You answer is here: https://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetData.htm

default [optional]
Combo, List: The default value.
Edit, Input: If non-empty (""), the string is inserted at the current insertion point (caret).

#include <GUIConstants.au3>

Global $EditBufSize = 281474976710656

$MainGUI = GUICreate("Test", 620, 300 )
$GUI_Log=GUICtrlCreateEdit ("", 20,20,600,200, BitOR($ES_NOHIDESEL,$ES_AUTOVSCROLL,$ES_READONLY, $WS_HSCROLL,$WS_VSCROLL, $ES_MULTILINE))

GUISetState ()
    GUICtrlSetData ($GUI_Log, "Hello" & @CRLF)
    GUICtrlSetData ($GUI_Log, "World" & @CRLF)
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
    EndSelect
WEnd

Exit
Edited by mpower
1 person likes this

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