Shaun Burdick Posted July 25, 2006 Share Posted July 25, 2006 Ok, I am having a problem with a button that happens to rest on top of a background image. You can tab to the button, and it works fine, just for some reason you cannot seem to be able to click it. Is this a limitation? or is this me? $pInformationWindow = GUICreate('Information Window', $WINDOWWIDTH, $WINDOWHEIGHT, $WINDOWLOCATIONX, _ $WINDOWLOCATIONY, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST, $WS_EX_LAYERED)) $pInformationBK = GUICtrlCreatePic($BKFILELOCATION, 0, 0, 0, 0) $pInformationLabel = GUICtrlCreateLabel("Computer Information:"& _ @LF & $sComputerInformation, 20, 20, 220, 135, $SS_CENTER) GUICtrlSetFont($pInformationLabel, 9, 4, '', 'ARIAL BOLD') GUICtrlSetBkColor($pInformationLabel, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetColor($pInformationLabel, $WINDOWFONTCOLOR) $buttonInfoWindowClose = GUICtrlCreateButton("X", 200, 9, 50, 12, BitOR($BS_FLAT, $BS_BITMAP), $WS_EX_TOPMOST) GUICtrlSetFont($buttonInfoWindowClose, 6, 2, '', 'ARIAL BOLD') ;GUICtrlSetTip($buttonInfoWindowClose, "Close") GUISetState(@SW_SHOW,$pInformationWindow) For some reason it will not let me click the button while the picture is under it, if I move the picture then I can click it fine? --ShaunProject PageProjects:[Drive and Printer List Tool] [RunAS Box Tool] Link to comment Share on other sites More sharing options...
NELyon Posted July 25, 2006 Share Posted July 25, 2006 Look at GUICtrlSetImage Link to comment Share on other sites More sharing options...
Shaun Burdick Posted July 25, 2006 Author Share Posted July 25, 2006 Look at GUICtrlSetImageWhat do you mean, i am not trying to set a background image on the button, just trying to put a button on a window that has a backgrond image. --ShaunProject PageProjects:[Drive and Printer List Tool] [RunAS Box Tool] Link to comment Share on other sites More sharing options...
BigDod Posted July 25, 2006 Share Posted July 25, 2006 Try disabling the picture by inserting GuiCtrlSetState(-1,$GUI_DISABLE) in the line after GUICtrlCreatePic. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Shaun Burdick Posted July 25, 2006 Author Share Posted July 25, 2006 Try disabling the picture by inserting GuiCtrlSetState(-1,$GUI_DISABLE) in the line after GUICtrlCreatePic.That did it, thank you very much!!! --ShaunProject PageProjects:[Drive and Printer List Tool] [RunAS Box Tool] Link to comment Share on other sites More sharing options...
jpm Posted July 25, 2006 Share Posted July 25, 2006 That did it, thank you very much!!!from the docIf a picture is set as a background picture, as the other controls will overlap, it important to disable the pic control : GuiCtrlSetState(-1,$GUI_DISABLE). This does not work with Tab control which behave differently. in this case you need to create the picture with the $WS_CLIPSIBLINGS style, some $GUI_ONTOP can still be necessary for the tab control.It is allways usefull to search in the doc... 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