CrewXp Posted April 6, 2006 Posted April 6, 2006 I have a gui running that is linked to some functions. But I want to know. Is there any way to change my gui? I don't want to create a new child gui, I would like to use the same gui if possible. So like, if I click the Misc tab on the GUI, the gui updates with new buttons in place of the old ones instead of making a whole new gui? I just want it all like one program. Thanks Here's my maingui so far Func MainGui() $maingui =GUICreate("test GUI",240,180) $1filemanager = GUICtrlCreateButton ("Utilities", 0,0,40,40,$BS_ICON) GUICtrlSetImage (-1, "CrewKit.icl",5) GUICtrlSetTip(-1,"File Manager") $2links = GUICtrlCreateButton ("Links", 40,00,40,40,$BS_ICON) GUICtrlSetImage (-1, "CrewKit.icl",4) GUICtrlSetTip(-1,"Links") $3misc = GUICtrlCreateButton ("Misc", 80,00,40,40,$BS_ICON) GUICtrlSetImage (-1, "CrewKit.icl",3) GUICtrlSetTip(-1,"Misc") $4send2tray = GUICtrlCreateButton ("Send To Tray", 120,0,40,40,$BS_ICON) GUICtrlSetImage (-1, "CrewKit.icl",6) GUICtrlSetTip(-1,"Hidden Mode") $5about = GUICtrlCreateButton ("About", 160,0,40,40,$BS_ICON) GUICtrlSetImage (-1, "CrewKit.icl",1) GUICtrlSetTip(-1,"About") $6close = GUICtrlCreateButton ("Close", 200,0,40,40,$BS_ICON) GUICtrlSetImage (-1, "CrewKit.icl",0) GUICtrlSetTip(-1,"Close") GUISetState() ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $1filemanager Then FileManager() If $msg = $2links Then Links() If $msg = $3misc Then Misc() If $msg = $4send2tray Then Hide() If $msg = $5about Then About() If $msg = $6close Then ExitLoop Wend GUIDelete() EndFunc
exodius Posted April 6, 2006 Posted April 6, 2006 I have a gui running that is linked to some functions. But I want to know. Is there any way to change my gui? I don't want to create a new child gui, I would like to use the same gui if possible. So like, if I click the Misc tab on the GUI, the gui updates with new buttons in place of the old ones instead of making a whole new gui? I just want it all like one program. Thanks For one, you're not using tabs at all, you're using buttons and making them kind of look like tabs, which while that's okay, it's entirely different in terms of making this work for you... The way you have it is going to be pretty easy. if each of While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $1filemanager Then FileManager() If $msg = $2links Then Links() If $msg = $3misc Then Misc() If $msg = $4send2tray Then Hide() If $msg = $5about Then About() If $msg = $6close Then ExitLoop Wend points to a different function, have those functions do GuiCtrlDeletes to remove the controls you don't want and then GuiCtrlCreate* to add in the controls you do.
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