monte Posted January 30, 2009 Share Posted January 30, 2009 Hello, I can't figure this out. I want to create a small child gui within a parent gui containing a label. My label isn't displaying it's text. Please help my ignorance. expandcollapse popup#include <WindowsConstants.au3> ;parent gui $doc = GUICreate("", 333, 750, 686, 1) GUISetBkColor(0xffffff) ;conditions $currentConditions = "Snow this morning will become heavy at times this afternoon. Some sleet may mix in. High 31F. Winds E at 10 to 20 mph. 6 to 10 inches of snow expected." $conditions = GUICtrlCreateLabel($currentConditions, 70, 25, 750, 15) GUICtrlSetColor(-1,0x000000) ; black GUICtrlSetTip(-1,"Current Weather Conditions") ;display parent gui GUISetState(@SW_SHOW, $doc) ;child gui, static label displaying text "Conditions: " $condLabelGui = GUICreate("", 60, 15, 0, 25,$WS_POPUP, $WS_EX_MDICHILD, $doc) $condLabel = GUICtrlCreateLabel("Conditions: ", 2, 25, 58, 13) GUISetState(@SW_SHOW, $condLabelGui) While 1 ;scroll conditions label scrollconditions() $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch sleep(1000) WEnd func scrollConditions() While 1 For $x = 100 to -600 step -2 ControlMove ($doc,"",$conditions, $x, 25) Sleep(30) Next exitloop WEnd endfunc Link to comment Share on other sites More sharing options...
Tomb Posted January 30, 2009 Share Posted January 30, 2009 try this. $condLabel = GUICtrlCreateLabel("Conditions: ", 2, 2, 58, 13) your label top is 25 when the GUI is only 15 height, so its not showing. Link to comment Share on other sites More sharing options...
monte Posted January 30, 2009 Author Share Posted January 30, 2009 Geez, that's what I get for copying my $conditions label from the parent gui into the child gui (and thinking too much about the partent gui and not enough about the child gui). Thanks, Tomb! Link to comment Share on other sites More sharing options...
Tomb Posted January 30, 2009 Share Posted January 30, 2009 no problem 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