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

[系统综合] [已解决]如何将插入符从input的位置从输入字符串的首跳到尾

[复制链接]
发表于 2014-1-14 20:18:04 | 显示全部楼层 |阅读模式
本帖最后由 oceanwind 于 2014-1-15 07:34 编辑

如下代码 ,该如何改呢?
#include <GUIConstantsEx.au3>
$main_Form = GUICreate("Test Caret", 300,70,300, 300)
$input1 = GUICtrlCreateInput("",1, 1, 298, 20)
 GUISetState(@SW_SHOW)
 While True
    If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit
WEnd
当前光标如图在"1"之前,如何移到字串尾即如图中"9"之后呢?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2014-1-15 02:27:11 | 显示全部楼层
#include <GUIConstantsEx.au3>
$main_Form = GUICreate("Test Caret", 300,70,300, 300)
$input1 = GUICtrlCreateInput("",1, 1, 298, 20)
$button1 = GUICtrlCreateButton("跳到尾",100,30,70,30)
 GUISetState(@SW_SHOW)
 While True
         $msg = GUIGetMsg()
         Switch $msg
                 Case $GUI_EVENT_CLOSE
                        Exit
                Case $button1
                        GUICtrlSetState($input1,$GUI_FOCUS)
                        GUICtrlSendMsg($input1,0x00B1,-1,0)
        EndSwitch
WEnd

评分

参与人数 1金钱 +10 收起 理由
oceanwind + 10 谢谢,非常不错

查看全部评分

 楼主| 发表于 2014-1-15 07:33:54 | 显示全部楼层
风行者 发表于 2014-1-15 02:27

谢谢,非常不错
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-28 15:21 , Processed in 0.081366 second(s), 26 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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