#include <GuiEdit.au3>
$gui = GUICreate('test', 220, 180)
$Edit = GUICtrlCreateEdit("This is a test", 10, 10)
$handl = GUICtrlGetHandle(-1)
GUISetState()
$step = 0
While 1
Sleep(2000)
Switch $step
Case 0
_GUICtrlEdit_AppendText($handl, @CRLF & 'This is new one')
WinSetTitle($gui, '', 'add?')
Case 1
WinSetTitle($gui, '', 'head?')
_GUICtrlEdit_SetSel($handl, 0, 0)
Case 2
_GUICtrlEdit_SetSel($handl, 0, -1)
WinSetTitle($gui, '', 'select all')
Case 3
_GUICtrlEdit_SetSel($handl, -1, -1)
WinSetTitle($gui, '', 'tail?')
Case Else
Exit
EndSwitch
$step += 1
WEnd
更多操作方法,请查看用户自定义函数里的GuiEdit帮助. |