Necromorph Posted February 22, 2010 Posted February 22, 2010 Okay, this is prolly going to be an easy one for you guys, but i can't seem to figure it out i want to make a combo box with two entries, but want those to be the only possible entrys in the control so i have this GUICREATE("PalMate ERP AutoInstaller", 300, 350) GUICTRLCREATELABEL("Server/Client Installer", 25, 25) $installer=GUICTRLCREATECOMBO("Server", 25, 40, 250) GUICTRLSETDATA(-1, "Client") GUICTRLCREATELABEL("Comapany Name", 25, 70) $installname=GUICTRLCREATEINPUT("Demo", 25, 85, 250) GUICTRLCREATELABEL("Port Number", 25, 115) $installport=GUICTRLCREATEINPUT("3127", 25, 130, 250) GUICTRLCREATEGROUP("Database Options", 20, 160, 260, 105) $installopt_1=GUICTRLCREATERADIO("No Change", 25, 175) $installopt_2=GUICTRLCREATERADIO("Update Existing Database", 25, 195) $installopt_3=GUICTRLCREATERADIO("Initialize Database", 25, 215) $installopt_4=GUICTRLCREATERADIO("Demonstration Database", 25, 235) $dbbackupopt=GUICTRLCREATECHECKBOX("Backup Existing Database", 25, 270) $start=GUICTRLCREATEBUTTON("Next >", 125, 300, 75) $install_cancel=GUICTRLCREATEBUTTON("Cancel", 200, 300, 75) GUISETSTATE() GUICTRLSETSTATE($installopt_4, $GUI_CHECKED) GUICTRLSETSTATE($start, $GUI_DEFBUTTON) no for the $var labeled $installer, i want only "server" or "client" to be in that box, so how do i lock it down so you can't type in it, but can still change the selections. thanks for you help.
Moderators Melba23 Posted February 22, 2010 Moderators Posted February 22, 2010 redLabel,You need the $CBS_DROPDOWNLIST style - like this: #include <GUIConstantsEx.au3> #include <ComboConstants.au3> $hGUI = GUICreate("Test", 500, 500) $installer=GUICTRLCREATECOMBO("Server", 25, 40, 250, Default, $CBS_DROPDOWNLIST) GUICTRLSETDATA(-1, "Client") GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEndM23 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
PsaltyDS Posted February 22, 2010 Posted February 22, 2010 Or like this: $installer=GUICTRLCREATECOMBO("Server", 25, 40, 250, Default, BitOR($GUI_SS_DEFAULT_COMBO , $CBS_DROPDOWNLIST)) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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