本帖最后由 qsy666888 于 2018-3-7 10:20 编辑
上一个帖子是左对齐,为什么Input加了右对齐$ES_RIGHT代码,又不能继续写入长的字符串了#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 180, 140, 192, 124)
$Input1 = GUICtrlCreateInput(""&@CRLF&'', 16, 24, 150, 30,$ES_MULTILINE+$ES_RIGHT + 0x80)
$butmc1 = GUICtrlCreateButton("abcd", 30, 70, 55, 25)
$butmc2 = GUICtrlCreateButton("efjhi", 90, 70, 55, 25)
$hangtext1= ''
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $butmc1
$hangtext1 = ControlCommand( "Form1", "", $Input1,"GetLine", 2)
GUICtrlSetData($Input1,''&@CRLF&$hangtext1&"abcdefghijklmn")
Case $butmc2
$hangtext1 = ControlCommand( "Form1", "", $Input1,"GetLine", 2)
GUICtrlSetData($Input1,''&@CRLF&$hangtext1&"123+++456")
EndSwitch
WEnd
|