找回密码
 加入
搜索
查看: 1241|回复: 3

[AU3基础] Input加了右对齐$ES_RIGHT代码,又不能继续长的字符串了(已解决)

[复制链接]
发表于 2018-3-7 09:05:24 | 显示全部楼层 |阅读模式
本帖最后由 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
发表于 2018-3-7 09:13:28 | 显示全部楼层
回复 1# qsy666888


    不要使用 $Input1 = GUICtrlCreateInput(""&@CRLF&'', 16, 24, 150, 30,$ES_MULTILINE+$ES_RIGHT + 0x80)



不要在建立控件時  就直接使用 右對齊,先使用標準建立  然後再使用風格設定 調整為 右對齊
 楼主| 发表于 2018-3-7 09:17:14 | 显示全部楼层
回复 2# kk_lee69

没有理解,我想在Input的第二行能够写入长的字符串,右对齐
发表于 2018-3-7 11:13:59 | 显示全部楼层
回复 3# qsy666888


$Input1 = GUICtrlCreateInput(""&@CRLF&'', 16, 24, 150, 30)
GUICtrlSetStyle(-1,$ES_MULTILINE+$ES_RIGHT + 0x80)
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-28 09:28 , Processed in 0.078660 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表