找回密码
 加入
搜索
查看: 1726|回复: 1

[GUI管理] 控件group的问题,请指教

[复制链接]
发表于 2014-1-5 10:28:48 | 显示全部楼层 |阅读模式
本帖最后由 babicy 于 2014-1-5 10:36 编辑
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Dim $Button[4]
$Form1 = GUICreate("Form1", 395, 438, 192, 124)
$Group1 = GUICtrlCreateGroup("Group1", 56, 24, 273, 345, BitOR($GUI_SS_DEFAULT_GROUP,$WS_VSCROLL))
For $i=1 To 3
$Button[$i] = GUICtrlCreateButton("Button1", 104, 100*$i, 153, 41)
Next
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

        EndSwitch
WEnd
新生成按钮控件不要跑到group外面,怎么才能固定在里面,如果按钮过多,滚动条就发生作用,这个要怎么去实现
发表于 2014-1-5 12:24:23 | 显示全部楼层
这个可能需要用子窗口来管理未知数量的按钮,但不建议使用这种另类的方式。
对于未知数量的控件用ListView方式会更美观也更实用。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-6 11:51 , Processed in 0.076053 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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