找回密码
 加入
搜索
查看: 1886|回复: 0

[GUI管理] 副文本。如何实现文本按钮,请高手赐教!

[复制链接]
发表于 2011-4-21 20:48:50 | 显示全部楼层 |阅读模式
#include <GuiRichEdit.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("输入/选择焦点切换", 300, 240)
$hRichEdit1 = _GUICtrlRichEdit_Create($Form1, "", 8, 16, 273, 145, BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_READONLY, $ES_AUTOVSCROLL))
_GUICtrlRichEdit_AppendText($hRichEdit1, @CR & "This is appended text.")
_GUICtrlRichEdit_AutoDetectURL($hRichEdit1, True)
_GUICtrlRichEdit_AppendText($hRichEdit1, @CR & "http://www.autoitscript.com")

$Input1 = GUICtrlCreateInput("", 8, 168, 273, 21)
$Button1 = GUICtrlCreateButton("富文本", 8, 200, 81, 25)
$Button2 = GUICtrlCreateButton("Input框", 96, 200, 89, 25)
$Button3 = GUICtrlCreateButton("退出", 192, 200, 89, 25)
GUISetState(@SW_SHOW)

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        GUIDelete();一定要加上否则退出后进程都还在
                        Exit
                Case $Button1
                        ControlFocus("输入/选择焦点切换", "", 'RICHEDIT50W1')
                Case $Button2
                        GUICtrlSetState($Input1, $GUI_FOCUS)
                Case $Button3
                        GUIDelete();一定要加上否则退出后进程都还在
                        Exit
        EndSwitch
WEnd


副文本,,创建按钮,点击就可以调用程序。。请高手赐教!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-21 08:26 , Processed in 0.076981 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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