gcue Posted June 23, 2016 Share Posted June 23, 2016 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! Link to comment Share on other sites More sharing options...
jguinch Posted June 23, 2016 Share Posted June 23, 2016 (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 June 23, 2016 by jguinch Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
gcue Posted June 23, 2016 Author Share Posted June 23, 2016 (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 June 23, 2016 by gcue Link to comment Share on other sites More sharing options...
spudw2k Posted June 23, 2016 Share Posted June 23, 2016 I suspect that is because GUICtlSetState is expecting an AutoIT control id and not a control handle (returned by _GUICtlTreeView_Create). Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now