StungStang Posted July 25, 2011 Share Posted July 25, 2011 (edited) Hi to all, i want add in my application a "console" like the Scite's auotoit editor. Here i want to write all the operation that the application are doing. But the problem is that.If i add the text with the GuiCtrlSetData, the guiedit it's delete the previus writed text, and add the new. There is a way to display in the editbox the entire texts digits?...a function like consolewrite but for guiedit?Hi! Edited July 25, 2011 by StungStang Link to comment Share on other sites More sharing options...
dragan Posted July 25, 2011 Share Posted July 25, 2011 (edited) Help file, command _GUICtrlEdit_AppendText:#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include <GuiEdit.au3> #include <GuiConstantsEx.au3> Opt('MustDeclareVars', 1) $Debug_Ed = False ; Check ClassName being passed to Edit functions, set to True and use a handle to another control to see it work _Main() Func _Main() Local $hEdit ; Create GUI GUICreate("Edit Append Text", 400, 300) $hEdit = GUICtrlCreateEdit("This is a test" & @CRLF & "Another Line", 2, 2, 394, 268) GUISetState() _GUICtrlEdit_AppendText($hEdit, @CRLF & "Append to the end?") ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>_Mainyou can also use this:#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include <GuiConstantsEx.au3> Opt('MustDeclareVars', 1) _Main() Func _Main() Local $hEdit ; Create GUI GUICreate("Edit Append Text", 400, 300) $hEdit = GUICtrlCreateEdit("This is a test" & @CRLF & "Another Line", 2, 2, 394, 268) GUISetState() ;setting data by reading it and adding new line: GUICtrlSetData($hEdit, GUICtrlRead($hEdit) & @CRLF & 'Append to the end?') ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>_Mainbut I would recommend _GUICtrlEdit_AppendText becase this last option is slower when your edit has lots of characters Edited July 25, 2011 by dragan Link to comment Share on other sites More sharing options...
StungStang Posted July 25, 2011 Author Share Posted July 25, 2011 Thank's for help, problem solved! =) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now