cappy2112 Posted January 10, 2006 Share Posted January 10, 2006 I've filled 2 combo boxes with 32 items, and now I want to display first item in one box, and the last item in the other box. After filling the combos, nothing is displayed in either box. Would someone point to to an example of how to do this, or at least the API's? Link to comment Share on other sites More sharing options...
Valuater Posted January 10, 2006 Share Posted January 10, 2006 maybe this #include <GUIConstants.au3> #include <Date.au3> GUICreate("MY GUI") $Button_1 = GUICtrlCreateButton("Select", 10, 50, 50, 20) $Button_2 = GUICtrlCreateButton("Exit", 60, 50, 50, 20) $Label_4 = GUICtrlCreateLabel("", 10, 10, 400, 30) GUICtrlSetFont($Label_4, 12) $Combo1 = GUICtrlCreateCombo("", 56, 250, 161, 21) GUICtrlSetData(-1, "_IEFormGetCount(|_IEFormGetCollection(|_IEFormGetObjByIndex(|_IEFormGetObjByName(|_IEFormGetNameByIndex(|_IEFormElementGetCount(|_IEFormElementGetCollection(|" & _ "_IEFormElementGetObjByIndex(|_IEFormElementGetObjByName(|_IEFormElementGetTypeByIndex(|_IEFormElementOptionGetCount(|_IEFormElementGetValue(|_IEFormElementSetValue(|_IEFormSubmit(|_IEFormReset(") $Combo2 = GUICtrlCreateCombo("", 56, 200, 161, 21) GUICtrlSetData(-1, "www.google.com|www.spamit.com|www.xpclenmenu.hostrocket.com|www.autoit3.com") GUISetState() ControlSetText("MY GUI", "", $Combo1, "_IECreate(") ControlSetText("MY GUI", "", $Combo2, "www.howdy.com") While 1 $msg = GUIGetMsg() Select Case $msg = $Button_1 GUICtrlSetData($Label_4, (GUICtrlRead($combo1)) & " " & (GUICtrlRead($combo2)) & " )") Case $msg = $GUI_EVENT_CLOSE Or $msg = $Button_2 Exit EndSelect WEnd 8) Link to comment Share on other sites More sharing options...
cappy2112 Posted January 10, 2006 Author Share Posted January 10, 2006 (edited) Thanks for the reply Something seems a littel strange here. There's got to be a shorter way to dispaly a specific item in a combo box. In VB I can do this in 2 lines of code. Edited January 11, 2006 by cappy2112 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