leevy Posted April 9, 2009 Posted April 9, 2009 Hello, I need a specific container, it will be implanted into a GUI window. There is a combo in the GUI window. if I select one item from this combo, some inputbox will be shown in the specific container. if I select another itme from this combo, the original inputbox in this container will be removed, and others inputbox will be shown. I have not found a suitable GUI control, could you help me?
Moderators Melba23 Posted April 9, 2009 Moderators Posted April 9, 2009 leevy, Is this what you mean?#include <GUIConstantsEx.au3> #Include <GuiComboBox.au3> GUICreate("Test", 300,200) $hCombo = GUICtrlCreateCombo("", 10, 10, 200, 50) GUICtrlSetData(-1, "One|Two|Three") $hEdit = GUICtrlCreateEdit("", 10, 100, 200, 50) GUISetState() While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit $sText = _GUICtrlComboBox_GetEditText($hCombo) If GUICtrlRead($hEdit) <> $sText Then GUICtrlSetData($hEdit, $sText) WEnd 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
andybiochem Posted April 9, 2009 Posted April 9, 2009 If i understand you correctly, this can be done with Tab controls. Just make the tab control bigger than the gui so you won't see any of the tabs. e.g.: #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) GUICreate("", 500, 400) $Combo = GUICtrlCreateCombo("", 32, 16, 417, 25) GUICtrlSetData(-1,"Menu 1|Menu 2") GUICtrlSetOnEvent(-1, "_ChangeTab") GUICtrlCreateTab(-10, -30, 520, 460) ;----- First menu ----- $Tab1 = GUICtrlCreateTabItem("1") GUICtrlCreateInput("This is the first menu",30,100,250,20) ;----- Second menu ----- $Tab2 = GUICtrlCreateTabItem("2") GUICtrlCreateInput("this is a different menu",70,200,250,20) GUICtrlCreateInput("with different controls",70,250,250,20) GUICtrlCreateTabItem("") GUISetState() While 1 Sleep(100) WEnd Func _ChangeTab() Switch GUICtrlRead($Combo) Case "Menu 1" GUICtrlSetState($Tab1,$GUI_SHOW) Case "Menu 2" GUICtrlSetState($Tab2,$GUI_SHOW) EndSwitch EndFunc - Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!
leevy Posted April 10, 2009 Author Posted April 10, 2009 (edited) Thanks for all, andybiochem's method suit my needs. But, I have another question, because I have had a parent tab control on the GUI window, can I add sub tab on the parent tab? Edited April 10, 2009 by leevy
leevy Posted April 10, 2009 Author Posted April 10, 2009 hi, I used a sub window to solve my question. I have not used tab control, but GUI window.
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