找回密码
 加入
搜索
查看: 2641|回复: 6

[GUI管理] [已解决]怎么创建这样的控件

  [复制链接]
发表于 2013-3-26 22:07:19 | 显示全部楼层 |阅读模式
本帖最后由 jwwlchen 于 2013-3-29 18:30 编辑



蓝色线条里的控件,点击Browse后可以出现选择路径的功能

本帖子中包含更多资源

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

×
发表于 2013-3-26 23:29:14 | 显示全部楼层
试试这个:  FileSelectFolder     FileOpenDialog

$var = FileSelectFolder("Choose a folder.", "")
发表于 2013-3-27 20:15:32 | 显示全部楼层
呵呵,多看帮助就行了
发表于 2013-3-27 20:15:38 | 显示全部楼层
呵呵,多看帮助就行了
发表于 2013-3-27 21:50:32 | 显示全部楼层
这是两个控件  Combo  和 Button
点击button调用一下FileSelectFolder 函数弹出选择文件夹的 框

#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 449, 192, 114)
$Combo1 = GUICtrlCreateCombo("", 72, 80, 177, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Button1 = GUICtrlCreateButton("浏览...", 280, 72, 65, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        $userpath = FileSelectFolder("选择一个位置", "")
                        If $userpath <> "" Then
                                GUICtrlSetData($Combo1, "")
                                GUICtrlSetData($Combo1, $userpath, $userpath)
                        EndIf
        EndSwitch
WEnd
 楼主| 发表于 2013-3-29 18:29:13 | 显示全部楼层
这是两个控件  Combo  和 Button
点击button调用一下FileSelectFolder 函数弹出选择文件夹的 框
veket_linux 发表于 2013-3-27 21:50


果然是这样的,谢谢!
发表于 2013-4-1 20:42:52 | 显示全部楼层
又学到好东西了
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-6-9 03:44 , Processed in 0.082096 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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