找回密码
 加入
搜索
查看: 1351|回复: 2

关于GUICtrlCreateInput的问题

[复制链接]
发表于 2009-1-11 00:13:02 | 显示全部楼层 |阅读模式
本人写了一个窗体代码如下:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
$Form4 = GUICreate("号码确认", 246, 174, 379, 178)
$Input41 = GUICtrlCreateInput("编号", 40, 80, 177, 21, 0)
$Label41 = GUICtrlCreateLabel("请确认此号码是否为当前号码,如果不是请更正!", 8, 16, 236, 33)
$Button41 = GUICtrlCreateButton("确定", 88, 128, 81, 25)

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

        EndSwitch
WEnd
我要问的问题是:当程序运行后,如何让GUICtrlCreateInput定义的输入框,所显示的内容:“编号”这两个字不要被全部选中,试了半天也没有办法,恳请哪位大侠给个解决办法。

[ 本帖最后由 silvay22 于 2009-1-11 10:05 编辑 ]
发表于 2009-1-11 08:50:47 | 显示全部楼层
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
$Form4 = GUICreate("号码确认", 246, 174, 379, 178)
$Input41 = GUICtrlCreateInput("", 40, 80, 177, 21, 0)
$Label41 = GUICtrlCreateLabel("请确认此号码是否为当前号码,如果不是请更正!", 8, 16, 236, 33)
$Button41 = GUICtrlCreateButton("确定", 88, 128, 81, 25)
GUISetState(@SW_SHOW)
GUICtrlSetData($Input41,"编号")
While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd
 楼主| 发表于 2009-1-11 10:04:45 | 显示全部楼层
十分感谢yufeij兄弟!问题完美解决!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-19 18:24 , Processed in 0.074077 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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