[已解决]怎么创建这样的控件
本帖最后由 jwwlchen 于 2013-3-29 18:30 编辑蓝色线条里的控件,点击Browse后可以出现选择路径的功能 试试这个:FileSelectFolder FileOpenDialog
$var = FileSelectFolder("Choose a folder.", "") 呵呵,多看帮助就行了 呵呵,多看帮助就行了 这是两个控件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
这是两个控件Combo和 Button
点击button调用一下FileSelectFolder 函数弹出选择文件夹的 框
veket_linux 发表于 2013-3-27 21:50 http://www.autoitx.com/images/common/back.gif
果然是这样的,谢谢! 又学到好东西了
页:
[1]