InsiDer Posted December 12, 2006 Posted December 12, 2006 Here's the issue: In my GUI (parent), a button opens a child, but after closing the child and returning to the parent, the button won't re-open the child? What may cause this?
GaryFrost Posted December 12, 2006 Posted December 12, 2006 Here's the issue: In my GUI (parent), a button opens a child, but after closing the child and returning to the parent, the button won't re-open the child? What may cause this?The Moon being on the far side of the Sun.Hard to help with-out code to look at. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
InsiDer Posted December 12, 2006 Author Posted December 12, 2006 (edited) Oh don't be silly expandcollapse popup#include <GUIConstants.au3> #include <XSkin.au3> $Skin_Folder = @ScriptDir & "\Skins\Red-Black" Dim $show = 0, $Child_[3], $children = 2 $XSkinGUI = XSkinGUICreate("x", 500, 500, $Skin_Folder) GUISetFont(14, 400, 4) $Button_2 = GUICtrlCreateButton("W", 60, 250, 170, 30) $Button_1 = GUICtrlCreateButton("W", 60, 300, 170, 30) $filemenu = GuiCtrlCreateMenu ("File") $exititem = GuiCtrlCreateMenuitem ("Exit",$filemenu) GUISetState() $Child_[1] = XSkinGUICreate("S", 400, 400, $Skin_Folder) $Button_15 = GUICtrlCreateButton ("Hide", 160, 310, 80, 30) GUISetState(@SW_HIDE) $Child_[2] = XSkinGUICreate("W", 400, 400, $Skin_Folder) $Button_21 = GUICtrlCreateButton ("Hide", 160, 310, 80, 30) GUISetState(@SW_HIDE) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $Button_1 Then GuiSetState( @SW_SHOW, $child_[1]) If $msg = $Button_2 Then GuiSetState( @SW_SHOW, $child_[2]) If $msg = $Button_15 Then GUIDelete($child_[1]) If $msg = $Button_21 Then GUIDelete($child_[2]) Select Case $msg = $exititem ExitLoop EndSelect wend What am I missing? Edited December 12, 2006 by InsiDer
GaryFrost Posted December 12, 2006 Posted December 12, 2006 Not tested, don't have the skin files here at work. you used GuiDelete instead of GuiSetState #include <GUIConstants.au3> #include <XSkin.au3> $Skin_Folder = @ScriptDir & "\Skins\Red-Black" Dim $show = 0, $Child_[3], $children = 2 $XSkinGUI = XSkinGUICreate ("x", 500, 500, $Skin_Folder) GUISetFont(14, 400, 4) $Button_2 = GUICtrlCreateButton("W", 60, 250, 170, 30) $Button_1 = GUICtrlCreateButton("W", 60, 300, 170, 30) $filemenu = GUICtrlCreateMenu("File") $exititem = GUICtrlCreateMenuitem("Exit", $filemenu) GUISetState() $Child_[1] = XSkinGUICreate ("S", 400, 400, $Skin_Folder) $Button_15 = GUICtrlCreateButton("Hide", 160, 310, 80, 30) GUISetState(@SW_HIDE) $Child_[2] = XSkinGUICreate ("W", 400, 400, $Skin_Folder) $Button_21 = GUICtrlCreateButton("Hide", 160, 310, 80, 30) GUISetState(@SW_HIDE) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $exititem ExitLoop Case $Button_1 GUISetState(@SW_SHOW, $Child_[1]) Case $Button_2 GUISetState(@SW_SHOW, $Child_[2]) Case $Button_15 GUISetState(@SW_HIDE, $Child_[1]) Case $Button_21 GUISetState(@SW_HIDE, $Child_[2]) EndSwitch WEnd SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
InsiDer Posted December 12, 2006 Author Posted December 12, 2006 Works like a charm, thank you very much. I appreciate it.
Valuater Posted December 12, 2006 Posted December 12, 2006 might want to add $Icon_Folder = @ScriptDir & "\Skins\Default" ; this $XSkinGUI = XSkinGUICreate ("x", 500, 500, $Skin_Folder) GUISetFont(14, 400, 4) $XIcon = XSkinIcon($XSkinGui, 2) ;this ; and this Switch GUIGetMsg() Case $XIcon[1] Exit Case $XIcon[2] GUISetState(@SW_MINIMIZE, $XSkinGUI) oÝ÷ ÛØb³*.q©ëzj/zØ^jëh×6 $filemenu = GUICtrlCreateMenu("File") $exititem = GUICtrlCreateMenuitem("Exit", $filemenu) .... just a nicer visual 8)
InsiDer Posted December 12, 2006 Author Posted December 12, 2006 As usual, Valuater steps in, shamelessly contributing considerably brilliant additions to ones application. Thank you
Valuater Posted December 13, 2006 Posted December 13, 2006 Double dipping a really nice comment thanks InsiDer .... and thanks gafrost for the support 8)
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