Jump to content

Recommended Posts

Posted

hello

i have 2 tabs setup and i would like the treeview to show up under just one tab but it shows up on both.  i take it this doesn't work because a treeview is not a control?

$current_tab = GUICtrlRead($tabs)

    If $current_tab = 0 Then
        Debug(0)
        GUICtrlSetState($scan_treeview, $GUI_SHOW)
    EndIf

    If $current_tab = 1 Then
        Debug(1)
        GUICtrlSetState($scan_treeview, $GUI_HIDE)
    EndIf

i really would like to avoid destroying it and re-creating it because id like to keep all the values there.

thank you in advance!

Posted (edited)

A treeview seems to have the same behaviour than another control with tabs :

#include <GUIConstantsEx.au3>

GUICreate("GUI", 180, 180)

GUICtrlCreateTab(10, 10, 150, 150)
GUICtrlCreateTabItem("First tab")

Local $idTreeview = GUICtrlCreateTreeView(50, 50, 100, 100)
GUICtrlCreateTreeViewItem("Item 1", $idTreeview)
GUICtrlCreateTreeViewItem("Item 2", $idTreeview)

GUICtrlCreateTabItem("Second tab")

GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            ExitLoop
    EndSwitch

WEnd

You have to create the tab control at the good place in the script

Edited by jguinch
Posted (edited)

looks like if i create the treeview with _GUICtrlTreeView_Create (which is what i was doing) it doesnt work but if i use GUICtrlCreateTreeView then it works.

thanks =)

Edited by gcue
Posted

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...