找回密码
 加入
搜索
查看: 1377|回复: 1

[GUI管理] 如何插入一个带行号的edit控件

[复制链接]
发表于 2016-11-19 23:56:19 | 显示全部楼层 |阅读模式
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 449, 192, 114)
$Edit1 = GUICtrlCreateEdit("", 48, 56, 497, 361)
GUICtrlSetData(-1, "Edit1")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd

如果往edit里面输入内容,在行前面显示行号

1 dsadasdfa
2 sadsadasdas
3 dsadsadasdasdasdsadsadasdasdas
4 dsadasdas
5 dasdasdsa
有办法实现吗
发表于 2016-11-20 00:05:01 | 显示全部楼层
伪代码:正则匹配行首,以数组下标做行号添加。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-20 09:50 , Processed in 0.078561 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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