找回密码
 加入
搜索
查看: 1258|回复: 3

[AU3基础] 隐藏 Tree[已解决]

[复制链接]
发表于 2011-9-15 18:10:39 | 显示全部楼层 |阅读模式
本帖最后由 lllangxx 于 2011-9-15 19:05 编辑

本意是想吧Tree隐藏可怎么会是这种状况?
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiTreeView.au3>
#include <WindowsConstants.au3>


 
GUICreate("listview items", 520, 550)
Global $sa, $txit,$TreeView1,$iStyle

$TreeView1 = GUICtrlCreateTreeView(2, 2, 200, 282, $iStyle, $WS_EX_CLIENTEDGE)


$Item1 = GUICtrlCreateTreeViewItem('软件分类1', $TreeView1)
$Item2 = GUICtrlCreateTreeViewItem('软件分类2', $TreeView1)
For $Item = 1 To 5
        GUICtrlCreateTreeViewItem('软件1-' & $Item, $Item1)
        GUICtrlCreateTreeViewItem('软件2-' & $Item, $Item2)
Next


$button = GUICtrlCreateButton("Value", 300, 170, 70, 20) 
    GUISetState()


    Do
        $msg = GUIGetMsg()
        
        Select
                        Case $msg = $button  
                                GUISetState($TreeView1,@SW_HIDE)
        EndSelect
    Until $msg = $GUI_EVENT_CLOSE

评分

参与人数 1金钱 +30 收起 理由
hzxymkb + 30

查看全部评分

发表于 2011-9-15 18:34:54 | 显示全部楼层
回复 1# lllangxx


    要注意窗口和控件的功别
把31行改为:GUIctrlSetState($TreeView1,$GUI_HIDE)
 楼主| 发表于 2011-9-15 19:05:03 | 显示全部楼层
回复  lllangxx


    要注意窗口和控件的功别
把31行改为:GUIctrlSetState($TreeView1,$GUI_HIDE)
happytc 发表于 2011-9-15 18:34



    谢谢happytc
发表于 2011-9-15 21:54:51 | 显示全部楼层
楼主真是乖,主动修改成[已解决]!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-10-1 15:27 , Processed in 0.137945 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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