Brentp Posted November 14, 2011 Share Posted November 14, 2011 Hi all, I have some code which is just a box that has a background image and has some buttons on it, when it runs the buttons are under the background image. If you hover over where the buttons should be they then appear. I have tried moving the line $Pic1 = GUICtrlCreatePic("BACKGROUND.BMP", 0, 0, 401, 265) up the top, When you run it the buttons are on top of the background, but they are not clickable. any ideas? Thanks $Form1_1 = GUICreate("Selector", 402, 273, 205, 142) GUISetBkColor(0xFFFFFF) $Button1 = GUICtrlCreateButton("Button 1", 95, 112, 97, 25) GUICtrlSetFont(-1, 8, 400, 0, "Calibri") $Button2 = GUICtrlCreateButton("Button 2", 95, 148, 97, 25) GUICtrlSetFont(-1, 8, 400, 0, "Calibri") $Button3 = GUICtrlCreateButton("Button 3", 95, 183, 97, 25) GUICtrlSetFont(-1, 8, 400, 0, "Calibri") $Button4 = GUICtrlCreateButton("Button 4", 300, 142, 67, 25) GUICtrlSetFont(-1, 8, 400, 0, "Calibri") $Pic1 = GUICtrlCreatePic("BACKGROUND.BMP", 0, 0, 401, 265) GUISetState(@SW_SHOW) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 14, 2011 Moderators Share Posted November 14, 2011 Brentp,If I had a pound for every time I have answered this I would be considerably richer! From the Help file:"If a picture is set as a background picture, as the other controls will overlap, it's important to disable the pic control [...]: GuiCtrlSetState(-1,$GUI_DISABLE)."Now you should find it all works as you want: #include <GUIConstantsEx.au3> $Form1_1 = GUICreate("Selector", 402, 273, 205, 142) $Pic1 = GUICtrlCreatePic("BACKGROUND.BMP", 0, 0, 401, 265) GUICtrlSetState(-1, $GUI_DISABLE) $Button1 = GUICtrlCreateButton("Button 1", 95, 112, 97, 25) GUICtrlSetFont(-1, 8, 400, 0, "Calibri") $Button2 = GUICtrlCreateButton("Button 2", 95, 148, 97, 25) GUICtrlSetFont(-1, 8, 400, 0, "Calibri") $Button3 = GUICtrlCreateButton("Button 3", 95, 183, 97, 25) GUICtrlSetFont(-1, 8, 400, 0, "Calibri") $Button4 = GUICtrlCreateButton("Button 4", 300, 142, 67, 25) GUICtrlSetFont(-1, 8, 400, 0, "Calibri") GUISetState(@SW_SHOW) While 1 If GUIGetMsg() = -3 Then Exit WEndAll clear? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Brentp Posted November 14, 2011 Author Share Posted November 14, 2011 Thanks M23, Thats what I was after 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