Drifter 0 Posted August 23, 2010 (edited) Why does this code not work?GUICreate("TabTest",500,500) GUICtrlCreateTab(10,10,480,480) GUICtrlCreateTabItem("test 1") GUICtrlCreateButton("button",40,40,60,60) GUICtrlCreateTabItem("test 2") GUICtrlCreateTab(40,40,200,200) GUICtrlCreateTabItem("tab in tab 1") GUICtrlCreateTabItem("tab in tab 2") GUISetState() Sleep(10000)The second tab menu should show up INSIDE the second tab item of the first tab menu, but instead the tabs on menu 1 are appended. Why? Edited August 23, 2010 by Drifter Share this post Link to post Share on other sites
Tvern 11 Posted August 23, 2010 (edited) In the helpfile on GUICtrlCreateTab:"ONLY one Tab control can be created by window. But a script can creates several windows having a tab in."To get the behavior you want, create a child on the parent tab item, then create the new tab control in that child gui.Edit: oh and the helpfile on GUICtrlCreateTabItem: "Don't forget to close your tabitem creation with GUICtrlCreateTabItem("")" Edited August 23, 2010 by Tvern Share this post Link to post Share on other sites
Drifter 0 Posted August 24, 2010 Seems I can't hide a tab either? GUICtrlSetState($tabitem,$GUI_HIDE) fails. Share this post Link to post Share on other sites
Tvern 11 Posted August 24, 2010 There is probably a way to do it, but I don't know how to hide a tabitem. A workaraound would be to create your tabitem in a function, so you can delete/recreate easily. You'd need to keep track of the values and states of the control in the tabitem though, so you can recreate them in their original state. I think I'd make 3 same size arrays (or one 2D array with 3 collumns), storing the control ID's, states and values of the controls. It should be ok, as long as you have a fixed number and order of controls. Seems a bit awkward I wonder if I am realy just missing an obvious way to hide an item. Share this post Link to post Share on other sites
Drifter 0 Posted August 24, 2010 I think I'll just create a second gui window to handle my "top level" tab set, it works i guess Share this post Link to post Share on other sites