隐藏 Tree[已解决]
本帖最后由 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# lllangxx
要注意窗口和控件的功别
把31行改为:GUIctrlSetState($TreeView1,$GUI_HIDE) 回复lllangxx
要注意窗口和控件的功别
把31行改为:GUIctrlSetState($TreeView1,$GUI_HIDE)
happytc 发表于 2011-9-15 18:34 http://www.autoitx.com/images/common/back.gif
谢谢happytc
{:face (411):} 楼主真是乖,主动修改成[已解决]!
页:
[1]