帮你改了一下,楼上二位可参考:
;注意,此时不要用input,而用edit,并改变风格即可
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GuiEdit.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 322, 99, 192, 124)
$Input1 = GUICtrlCreateEdit("测试显示", 16, 16, 289, 21,$ES_AUTOHSCROLL+$ES_AUTOVSCROLL)
GUICtrlSetColor(-1, 0xff0000) ; Red
$Button1 = GUICtrlCreateButton("保存", 64, 56, 75, 25)
$Button2 = GUICtrlCreateButton("重置", 168, 56, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetStyle($Input1, $ES_READONLY+$ES_AUTOHSCROLL+$ES_AUTOVSCROLL)
Case $Button2
GUICtrlSetStyle($Input1, $ES_AUTOHSCROLL+$ES_AUTOVSCROLL)
GUICtrlSetData($Input1,"测试显示")
EndSwitch
WEnd
|