Jump to content

Recommended Posts


Here is my first development with AutoIt GUI.

I have search on the forum but find nothing about it.

I have found 3.1.1++ which could delete TreeView Items

I'm making an interface for software installation with differents parameters.

It's a sort of wizard and I will guide user with a treeview.

1- Is it possible to disable items from a given treeview ?

That I want it's, depending on choice made, enable and disable some steps in my treeview.

I would like that user could go back to a previous step without a back button and jump to any step and make modifications. But if a feature is not choose he does not access to this under the treeview.


2- Is it possible to do a treeview that user could not click (not just grayed) on but could see all performed operations ?

So here make it with button back and next and the treeview is just a view of wizard steps.

Thanks to all for your help

Excuse me for my english.

I hope this will understand

Writed from France


Link to post
Share on other sites

Answer 1, currently no, Holger could probably elaborate on that more.

Answer 2, to some limit, example:


#include <GUIConstants.au3>

#include <GuiTreeView.au3>

opt("MustDeclareVars", 1)

opt("GUIDataSeparatorChar", "\")

Dim $h_GUI, $treeview, $nItem1, $nItem2, $nItem3

Dim $nSubItem1, $nSubItem2, $nSubItem3, $nSubItem4, $nSubItem5, $nSubItem6, $nSubItem7

Dim $Btn_Expand, $Btn_ExpandItem, $Msg, $Btn_Collapse, $Btn_CollapseItem

$h_GUI = GUICreate("TreeView Expand", 392, 254)

$treeview = GUICtrlCreateTreeView(10, 10, 150, 150)

$nItem2 = GUICtrlCreateTreeViewItem("Item2", $treeview)

$nItem1 = GUICtrlCreateTreeViewItem("Item1", $treeview)

$nItem3 = GUICtrlCreateTreeViewItem("Item3", $treeview)

$nSubItem2 = GUICtrlCreateTreeViewItem("SubItem2", $nItem1)

$nSubItem1 = GUICtrlCreateTreeViewItem("SubItem1", $nItem1)

$nSubItem4 = GUICtrlCreateTreeViewItem("SubItem4", $nSubItem1)

$nSubItem5 = GUICtrlCreateTreeViewItem("SubItem5", $nSubItem4)

$nSubItem6 = GUICtrlCreateTreeViewItem("SubItem6", $nSubItem5)

$nSubItem3 = GUICtrlCreateTreeViewItem("SubItem3", $nSubItem1)

$nSubItem7 = GUICtrlCreateTreeViewItem("SubItem7", $nItem3)


$Btn_Expand = GUICtrlCreateButton("Expand All", 70, 170, 90, 20)

$Btn_Collapse = GUICtrlCreateButton("Collapse All", 200, 170, 90, 20)

$Btn_ExpandItem = GUICtrlCreateButton("Expand Item1", 70, 200, 90, 20)

$Btn_CollapseItem = GUICtrlCreateButton("Collapse Item1", 200, 200, 90, 20)


While 1

$Msg = GUIGetMsg()




Case $Msg = $Btn_Expand

_GUICtrlTreeViewExpand ($h_GUI, $treeview)

Case $Msg = $Btn_ExpandItem

_GUICtrlTreeViewExpand ($h_GUI, $treeview, 1, $nItem1)

Case $Msg = $Btn_Collapse

_GUICtrlTreeViewExpand ($h_GUI, $treeview, 0)

Case $Msg = $Btn_CollapseItem

_GUICtrlTreeViewExpand ($h_GUI, $treeview, 0, $nItem1)




SciTE for AutoItDirections for Submitting Standard UDFs


Don't argue with an idiot; people watching may not be able to tell the difference.


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...