maniootek Posted February 19, 2010 Share Posted February 19, 2010 $input2b = GUICtrlCreateCombo("1", 120, 80, 35, 20) GUICtrlSetData(-1, "2|3|4") How to block this input? User can choose one from 4 position but it can be changed by keyboard. Link to comment Share on other sites More sharing options...
Steveiwonder Posted February 19, 2010 Share Posted February 19, 2010 (edited) GUICtrlSetState ( controlID, $GUI_DISABLE ) Not sure if this is what your looking for? Edited February 19, 2010 by Steveiwonder They call me MrRegExpMan Link to comment Share on other sites More sharing options...
maniootek Posted February 19, 2010 Author Share Posted February 19, 2010 (edited) No, it is not. Now user can't choose anything. I want let him choose one from 4 position but don't let him to change this choosen one Added: It is similar to menu Edited February 19, 2010 by maniootek Link to comment Share on other sites More sharing options...
Steveiwonder Posted February 19, 2010 Share Posted February 19, 2010 Then i dont know, but maybe you could use GUICtrlCreateList They call me MrRegExpMan Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 19, 2010 Moderators Share Posted February 19, 2010 maniootek,You need the $CBS_DROPDOWNLIST style for your combo - then the user can only choose what you have set in the list: #include <GUIConstantsEx.au3> #include <ComboConstants.au3> $hGUI = GUICreate("Test", 500, 500) $hInput = GUICtrlCreateCombo("1", 120, 80, 35, 20, $CBS_DROPDOWNLIST) GUICtrlSetData(-1, "2|3|4") 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 Link to comment Share on other sites More sharing options...
maniootek Posted February 20, 2010 Author Share Posted February 20, 2010 M23, this is it ! Now one more question, how to read this input and get index of choosen position? for example: I have got listed : Monday Tuesday Wednesday Thursday Friday Saturday Sunday and now I want get int "1" if it is choosen at "Monday" and "6" if "Saturday" Link to comment Share on other sites More sharing options...
zackrspv Posted February 20, 2010 Share Posted February 20, 2010 _GUICtrlComboBox_GetCurSel() Use that UDF to get the current int position of the selected item. Also, look at the rest of the comands in that UDF, they will help you greatly even if you didnt use _GuiCtrlCombobox_create* -_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë ë§§ëñ§ë øƒ !ïƒë. Link to comment Share on other sites More sharing options...
maniootek Posted February 21, 2010 Author Share Posted February 21, 2010 Thank you, it's working 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