seres Posted August 15, 2011 Share Posted August 15, 2011 hello, i started a program and i created a gui for it, i have to be adding more stuff to the gui, when i run out of space (gui), i had to start another program and create another gui, do you know if theres a way to create tabs or something that when i click it shows me the first or second part of the program, so i can make this 2 programs one if theres an example can you please show it, or a link to that example thanks Link to comment Share on other sites More sharing options...
sleepydvdr Posted August 15, 2011 Share Posted August 15, 2011 Use Koda to help you create tabs. I created this in 30 seconds with Koda. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 331, 227, 192, 124) $Tab1 = GUICtrlCreateTab(16, 16, 289, 193) $TabSheet1 = GUICtrlCreateTabItem("TabSheet1") $Button1 = GUICtrlCreateButton("Button1", 32, 96, 75, 25) $TabSheet2 = GUICtrlCreateTabItem("TabSheet2") $Button2 = GUICtrlCreateButton("Button2", 192, 176, 75, 25) $TabSheet3 = GUICtrlCreateTabItem("TabSheet3") $Button3 = GUICtrlCreateButton("Button3", 192, 48, 75, 25) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
sleepydvdr Posted August 15, 2011 Share Posted August 15, 2011 Another thing you can do is to create popup guis for things that don't always need to be seen, such as a settings panel. Example: expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ComboConstants.au3> $Form1 = GUICreate("Test", 331, 227, -1, -1) $Input1 = GUICtrlCreateInput("Input1", 24, 24, 121, 21) $Button1 = GUICtrlCreateButton("Submit", 240, 176, 75, 25) $Button2 = GUICtrlCreateButton("Settings", 232, 24, 75, 25) $Edit1 = GUICtrlCreateEdit("", 24, 72, 185, 89) GUICtrlSetData(-1, "Edit1") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button2 _SettingsPanel() EndSwitch WEnd Func _SettingsPanel() #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Settings", 331, 227, -1, -1) $Input1a = GUICtrlCreateInput("Input1", 48, 24, 121, 21) $Input2 = GUICtrlCreateInput("Input2", 48, 56, 121, 21) $Input3 = GUICtrlCreateInput("Input3", 48, 88, 121, 21) $Input4 = GUICtrlCreateInput("Input4", 48, 120, 121, 21) $Combo1 = GUICtrlCreateCombo("Combo1", 48, 160, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) $Radio1 = GUICtrlCreateRadio("This", 216, 32, 113, 17) $Radio2 = GUICtrlCreateRadio("That", 216, 64, 113, 17) $Button3 = GUICtrlCreateButton("Save", 232, 160, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete($Form2) ExitLoop Case $Button3 GUIDelete($Form2) ExitLoop EndSwitch WEnd EndFunc #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
seres Posted August 16, 2011 Author Share Posted August 16, 2011 (edited) Use Koda to help you create tabs. I created this in 30 seconds with Koda. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 331, 227, 192, 124) $Tab1 = GUICtrlCreateTab(16, 16, 289, 193) $TabSheet1 = GUICtrlCreateTabItem("TabSheet1") $Button1 = GUICtrlCreateButton("Button1", 32, 96, 75, 25) $TabSheet2 = GUICtrlCreateTabItem("TabSheet2") $Button2 = GUICtrlCreateButton("Button2", 192, 176, 75, 25) $TabSheet3 = GUICtrlCreateTabItem("TabSheet3") $Button3 = GUICtrlCreateButton("Button3", 192, 48, 75, 25) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd hello, thanks this one really helped me Edited December 29, 2012 by Jon Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 16, 2011 Moderators Share Posted August 16, 2011 seres,Take a look at the GUIExtender UDF in my sig. It allows you to extend parts of your GUI when needed and retract them when not. 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...
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