RaZ0r Posted July 30, 2011 Share Posted July 30, 2011 Hello all! I search forums but i can't find solution to my problem. I have few ComboGui's something like this : $Combo5 = GUICtrlCreateCombo("", 552, 220, 74, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Numpad 1|Numpad 2|Numpad 3|Numpad 4|Numpad 5|Numpad 6|Numpad 7|Numpad 8|Numpad 9|Numpad 0") $Combo6 = GUICtrlCreateCombo("", 552, 250, 74, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Numpad 1|Numpad 2|Numpad 3|Numpad 4|Numpad 5|Numpad 6|Numpad 7|Numpad 8|Numpad 9|Numpad 0") $Combo7 = GUICtrlCreateCombo("", 552, 280, 74, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Numpad 1|Numpad 2|Numpad 3|Numpad 4|Numpad 5|Numpad 6|Numpad 7|Numpad 8|Numpad 9|Numpad 0") As You see in this defined Combos i have same values and here is my question: How to delete used values from list in other Combos ? What i mean : If i select in $Combo5 value "Numpad5" they dont disappear from other Combos. It is possible to If selected in $xComboList then disappear from rest $ComboList ? Thx for help! Link to comment Share on other sites More sharing options...
Spiff59 Posted July 30, 2011 Share Posted July 30, 2011 (edited) Hello, welcome to the forum! I think there may be more details needed as to what you're really trying to do. Particularily, what the trigger is to cause a delete from the 3 combo controls... Is there a "delete" button? You've implied that simply selecting a value in a combo would trigger the deletes? It's odd, but I made this example that deletes any selected ($combo5) value from all three lists. #include <ComboConstants.au3> #include <GUIComboBox.au3> GUICreate("",640, 360) $Combo5 = GUICtrlCreateCombo("", 552, 220, 74, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Numpad 1|Numpad 2|Numpad 3|Numpad 4|Numpad 5|Numpad 6|Numpad 7|Numpad 8|Numpad 9|Numpad 0") $Combo6 = GUICtrlCreateCombo("", 552, 250, 74, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Numpad 1|Numpad 2|Numpad 3|Numpad 4|Numpad 5|Numpad 6|Numpad 7|Numpad 8|Numpad 9|Numpad 0") $Combo7 = GUICtrlCreateCombo("", 552, 280, 74, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Numpad 1|Numpad 2|Numpad 3|Numpad 4|Numpad 5|Numpad 6|Numpad 7|Numpad 8|Numpad 9|Numpad 0") GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case -3 Exit Case $Combo5 $Index = _GUICtrlComboBox_GetCurSel($Combo5) _GUICtrlComboBox_DeleteString($Combo5, $index) _GUICtrlComboBox_DeleteString($Combo6, $index) _GUICtrlComboBox_DeleteString($Combo7, $index) Case $Combo6 Case $Combo7 EndSwitch WEnd It does require that all 3 comboboxes contain the same data at all times, as stated. Edited July 30, 2011 by Spiff59 Link to comment Share on other sites More sharing options...
RaZ0r Posted July 30, 2011 Author Share Posted July 30, 2011 (edited) I badly specify what i want to do. Urs example just delete values completely from ComboBox lists. Now ill try to specify better ;p This script will be simple keybinder, so at now Comboboxes are just way to pick "key" (i choose numpad buttons as you see) to send text declared in "inputbox" ( 10 Input boxes for 10 defined keys ). Let's see > for "$Combo1" i pick value "Numpad 1" which is responde of sends text from Inputbox1 then if for $Combo2 ill pick again Numpad 1 ill double sends of Input1. Again what i want > if i define "Numpad 1" for "$Combo1" i want to this defined key will be not VISABLE in others Comboboxes list but if i change value from "numpad 1" to "numpad 2" in "$Combo1" , value should be again visable in others Comboboxes ( and Numpad 2 should be not ) Hope that my prehistoric english have any sense for you ;P Thx Edited July 30, 2011 by RaZ0r 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