ForsakenGod Posted March 17, 2010 Share Posted March 17, 2010 Hello , I ve finished creating one part of my programm and i want to develope it more . I ve decited to use the same exe and i want to divide theese different parts of programm into 2 Tabs . I know how to create theese tabs but i completely need to change the outlook of the gui when users clicks from Tab1 to Tab2 . Like i have a 3 buttons on 1 st tab but i want that when user clicks on 2nd tab button will dissapear and a combobox appears . Thank you for your time Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 17, 2010 Moderators Share Posted March 17, 2010 ForsakenGod,I know how to create theese tabsSo have you run the example in the Help file under GUICtrlCreateTab? It shows you exactly how to do what you want. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
ForsakenGod Posted March 17, 2010 Author Share Posted March 17, 2010 (edited) ForsakenGod,So have you run the example in the Help file under GUICtrlCreateTab? It shows you exactly how to do what you want. M23Well i m using koda the problem is that i ve 1st part already done (also in groups etc) and when i try to move it on my new tabsheet it slides under Also i would like to ask if its possible to modify the color of the tab sheet Edited March 17, 2010 by ForsakenGod Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 17, 2010 Moderators Share Posted March 17, 2010 ForsakenGod,Just arrange your code so it looks like this:; Create tab control $tab = GUICtrlCreateTab(....) ; Create first tab $tab0 = GUICtrlCreateTabItem("tab0") ; Now all code to create the controls for this tab ; Now create second tab $tab1 = GUICtrlCreateTabItem("tab1") ; Here all the code for the controls on this tab ; And another tab $tab2 = GUICtrlCreateTabItem("tab2") ; And again code for the controls on this tab goes here ; And then, very impotantly, close the tabitem definition GUICtrlCreateTabItem("") ; end tabitem definitionForget Koda for the moment, use copy and paste in SciTE to get your code like that and everything should stay in place and not "slide under". M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
ForsakenGod Posted March 17, 2010 Author Share Posted March 17, 2010 ForsakenGod, Just arrange your code so it looks like this: ; Create tab control $tab = GUICtrlCreateTab(....) ; Create first tab $tab0 = GUICtrlCreateTabItem("tab0") ; Now all code to create the controls for this tab ; Now create second tab $tab1 = GUICtrlCreateTabItem("tab1") ; Here all the code for the controls on this tab ; And another tab $tab2 = GUICtrlCreateTabItem("tab2") ; And again code for the controls on this tab goes here ; And then, very impotantly, close the tabitem definition GUICtrlCreateTabItem("") ; end tabitem definition Forget Koda for the moment, use copy and paste in SciTE to get your code like that and everything should stay in place and not "slide under". M23 Thank you ! Worked like a charm . Any idea if its possible to modify the color of the sheet ? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 17, 2010 Moderators Share Posted March 17, 2010 ForsakenGod, You cannot do it directly, bu this will let you go some way towards it: #include <GuiConstantsEx.au3> #include <GuiTab.au3> $Gui = GUICreate("_GUICtrlTab_SetBkColor() Demo", 320, 280) $hTab = GUICtrlCreateTab(10, 20, 300, 250) GUICtrlCreateTabItem("Tab 1") _GUICtrlTab_SetBkColor($Gui, $hTab, 0xFF0000) GUICtrlCreateButton("Some Button", 20, 50) GUICtrlCreateTabItem("Tab 2") _GUICtrlTab_SetBkColor($Gui, $hTab, 0x00CC00) GUICtrlCreateCheckbox("Some Checkbox", 20, 50) GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _GUICtrlTab_SetBkColor($hWnd, $hSysTab32, $sBkColor) Local $aTabPos = ControlGetPos($hWnd, "", $hSysTab32) Local $aTab_Rect = _GUICtrlTab_GetItemRect($hSysTab32, -1) GUICtrlCreateLabel("", $aTabPos[0]+2, $aTabPos[1]+$aTab_Rect[3]+4, $aTabPos[2]-6, $aTabPos[3]-$aTab_Rect[3]-7) GUICtrlSetBkColor(-1, $sBkColor) GUICtrlSetState(-1, $GUI_DISABLE) EndFunc M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
ForsakenGod Posted March 17, 2010 Author Share Posted March 17, 2010 ForsakenGod, You cannot do it directly, bu this will let you go some way towards it: #include <GuiConstantsEx.au3> #include <GuiTab.au3> $Gui = GUICreate("_GUICtrlTab_SetBkColor() Demo", 320, 280) $hTab = GUICtrlCreateTab(10, 20, 300, 250) GUICtrlCreateTabItem("Tab 1") _GUICtrlTab_SetBkColor($Gui, $hTab, 0xFF0000) GUICtrlCreateButton("Some Button", 20, 50) GUICtrlCreateTabItem("Tab 2") _GUICtrlTab_SetBkColor($Gui, $hTab, 0x00CC00) GUICtrlCreateCheckbox("Some Checkbox", 20, 50) GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _GUICtrlTab_SetBkColor($hWnd, $hSysTab32, $sBkColor) Local $aTabPos = ControlGetPos($hWnd, "", $hSysTab32) Local $aTab_Rect = _GUICtrlTab_GetItemRect($hSysTab32, -1) GUICtrlCreateLabel("", $aTabPos[0]+2, $aTabPos[1]+$aTab_Rect[3]+4, $aTabPos[2]-6, $aTabPos[3]-$aTab_Rect[3]-7) GUICtrlSetBkColor(-1, $sBkColor) GUICtrlSetState(-1, $GUI_DISABLE) EndFunc M23 Thank youu ! Really really nice workaround Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 17, 2010 Moderators Share Posted March 17, 2010 ForsakenGod,Not mine - so credit to whoever posted it so I could keep it in my "Snippets" folder.By the way, when you reply please use the "Add Reply" button at the top and bottom of the page rather then the "Reply" button in the post itself. That way you do not get the contents of the previous post quoted in your reply and the whole thread becomes easier to read. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
ForsakenGod Posted March 17, 2010 Author Share Posted March 17, 2010 Ok Sorry for that I just was really happy Thanks one more time 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