LineageIIC3Freak Posted May 14, 2006 Share Posted May 14, 2006 Ok hi everyone how is it going? Well today I have a noobish problem and it will probably be answered to VERY easily. Ok i'm making a program that deals with a ton of controls that depend on combo box selections. There is where my problem is and I figure thats probably easy to fix so would anyone mind helping me. So basically for each selection on a combo i want the controls to change on the GUI. I can set where to create them and everything but i'm not sure how to set each event and to have controls change on each selection. I can't figure out how to put screenshots on here so here is the code I have at the moment. expandcollapse popup#include <GUIConstants.au3> Opt("GUIOnEventMode", 1) HotKeySet("{ESC}", "Quit") HotKeySet("{F12}", "Pause") GUICreate("COAutoPilot", 500, 300) GUICtrlCreatePic("C:\Documents and Settings\Woozer\My Documents\My Pictures\QuickBar.bmp", 5, 255, 410, 39) GUICtrlCreateLabel("Character Select", 5, 10) GUICtrlCreateCombo("", 5, 25, 100, 20, $CBS_DROPDOWNLIST) GUICtrlSetData(-1,"Warrior|Trojan|Archer|Taoist", "Warrior") GUICtrlCreateLabel("Area Select", 5, 50) GUICtrlCreateCombo("", 5, 65, 100, 20, $CBS_DROPDOWNLIST) GUICtrlSetData(-1,"Twin City|Ape City|Phoenix Castle|Bird Island|Desert City|Adventure Land", "Twin City") GUICtrlCreateLabel("Monster Select", 5, 90) GUICtrlCreateCombo("", 5, 105, 100, 20, $CBS_DROPDOWNLIST) GUICtrlSetData(-1,"TombBat|Hawking|AlienSerpent|SlowApe|ElfApe", "TombBat") GUICtrlCreateButton("Run", 420, 255, 75, 20) $EBtn = GUICtrlCreateButton("Exit", 420, 275, 75, 20) GUICtrlSetOnEvent($EBtn, "Quit") GUICtrlCreateGroup("Controls", 180, 30, 260, 180); <--- Temporary GUICtrlCreateLabel("This is for expample purposes only.", 200, 50); <--- Temporary GUICtrlCreateLabel("A Variety Of Conrols Should Be Here.", 200, 100); <--- Temporary GUICtrlCreateLabel("But Only When A Combo Selection Is Made.", 200, 150); <--- Temporary GUISetState() While 1 Sleep(1000) WEnd Func Pause() While 1 Sleep(1) WEnd EndFunc Func Quit() Exit EndFunc Oh and where you see TombBat|Hawking|AlienSerpent|SlowApe|ElfApe I want to set an event where the combo second from the top changes the information in that depending on which "city" you select. If somone can take time out of their own and help me with this i'd appreciate it very much. I'll also be sure you will be the first to receive a final version. Thank You! [quote]I don't like to think, Therefore I ChEaT[/quote] Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted May 14, 2006 Share Posted May 14, 2006 let me get this straight so when someone selects something on this combo box GUICtrlCreateCombo("", 5, 25, 100, 20, $CBS_DROPDOWNLIST) GUICtrlSetData(-1,"Warrior|Trojan|Archer|Taoist", "Warrior") whatever it is you want it to change to something in this combo box GUICtrlCreateCombo("", 5, 105, 100, 20, $CBS_DROPDOWNLIST) GUICtrlSetData(-1,"TombBat|Hawking|AlienSerpent|SlowApe|ElfApe", "TombBat") Link to comment Share on other sites More sharing options...
Examiner Posted May 14, 2006 Share Posted May 14, 2006 No, when you select a choice from this combo box: GUICtrlCreateCombo("", 5, 65, 100, 20, $CBS_DROPDOWNLIST) GUICtrlSetData(-1,"Twin City|Ape City|Phoenix Castle|Bird Island|Desert City|Adventure Land", "Twin City") I want the choices from this box to change: GUICtrlCreateCombo("", 5, 105, 100, 20, $CBS_DROPDOWNLIST) GUICtrlSetData(-1,"TombBat|Hawking|AlienSerpent|SlowApe|ElfApe", "TombBat") And when i select something from this box: GUICtrlCreateCombo("", 5, 25, 100, 20, $CBS_DROPDOWNLIST) GUICtrlSetData(-1,"Warrior|Trojan|Archer|Taoist", "Warrior") I want the controls on the GUI to change... Link to comment Share on other sites More sharing options...
LineageIIC3Freak Posted May 14, 2006 Author Share Posted May 14, 2006 lol crap didnt know i was logged on as Examiner lol but yea thas me above [quote]I don't like to think, Therefore I ChEaT[/quote] Link to comment Share on other sites More sharing options...
LineageIIC3Freak Posted May 14, 2006 Author Share Posted May 14, 2006 Ok, let me clean up my question a little bit... ok look When I make a selection from this box:(Theyre Cities In The Game) GUICtrlCreateCombo("", 5, 65, 100, 20, $CBS_DROPDOWNLIST) GUICtrlSetData(-1,"Twin City|Ape City|Phoenix Castle|Bird Island|Desert City|Adventure Land", "Twin City") I want the entire selection to be changed inside of this on:(Monsters In Each City) GUICtrlCreateCombo("", 5, 105, 100, 20, $CBS_DROPDOWNLIST) GUICtrlSetData(-1,"TombBat|Hawking|AlienSerpent|SlowApe|ElfApe", "TombBat") And when i select something from this box: GUICtrlCreateCombo("", 5, 25, 100, 20, $CBS_DROPDOWNLIST) GUICtrlSetData(-1,"Warrior|Trojan|Archer|Taoist", "Warrior") I want the controls on the GUI to change... Heres the code, copy this to notepad save as .au3 and check it out and reply please.... expandcollapse popup#include <GUIConstants.au3> Opt("GUIOnEventMode", 1) HotKeySet("{ESC}", "Quit") HotKeySet("{F12}", "Pause") GUICreate("COAutoPilot", 500, 300) GUICtrlCreatePic("C:\Documents and Settings\Woozer\My Documents\My Pictures\QuickBar.bmp", 5, 255, 410, 39) GUICtrlCreateLabel("Character Select", 5, 10) GUICtrlCreateCombo("", 5, 25, 100, 20, $CBS_DROPDOWNLIST) GUICtrlSetData(-1,"Warrior|Trojan|Archer|Taoist", "Warrior") GUICtrlCreateLabel("Area Select", 5, 50) GUICtrlCreateCombo("", 5, 65, 100, 20, $CBS_DROPDOWNLIST) GUICtrlSetData(-1,"Twin City|Ape City|Phoenix Castle|Bird Island|Desert City|Adventure Land", "Twin City") GUICtrlCreateLabel("Monster Select", 5, 90) GUICtrlCreateCombo("", 5, 105, 100, 20, $CBS_DROPDOWNLIST) GUICtrlSetData(-1,"TombBat|Hawking|AlienSerpent|SlowApe|ElfApe", "TombBat") GUICtrlCreateButton("Run", 420, 255, 75, 20) $Temporary = GUICtrlCreateButton("Exit", 420, 275, 75, 20) GUICtrlSetOnEvent($Temporary, "Quit") GUICtrlCreateGroup("Controls", 180, 30, 260, 180); Just an example GUICtrlCreateLabel("This is for expample purposes only.", 200, 50); Just a temporary label GUICtrlCreateLabel("A Variety Of Conrols Should Be Here.", 200, 100); Just a temporary label GUICtrlCreateLabel("But Only When A Combo Selection Is Made.", 200, 150); Just a temporary label GUICtrlCreateLabel("The Area Selection Combo Should", 5, 130); Just a temporary label GUICtrlCreateLabel("Change All The Choices In The", 5, 150); Just a temporary label GUICtrlCreateLabel("Monster Select Combo Box To A", 5, 170); Just a temporary label GUICtrlCreateLabel("New Set. Example Ape City =", 5, 190); Just a temporary label GUICtrlCreateLabel("ElfApe and SlowApe then Phoenix", 5, 210); Just a temporary label GUICtrlCreateLabel("Castle = WingedSnake n Hawking", 5, 230); Just a temporary label GUISetState() While 1 Sleep(1000) WEnd Func Pause() While 1 Sleep(1) WEnd EndFunc Func Quit() Exit EndFunc [quote]I don't like to think, Therefore I ChEaT[/quote] 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