Jump to content

Recommended Posts

Ok, my GUI layout has a specific colour scheme. The only way I've seen how to do this so far is to colour the background with lables, but ... I can't click any buttons I've built on top of the lables. I mean, it works when I comment out the large white label, and I can click on the buttons just fine...

Is this a limitation of AutoIt?

#include <GUIConstants.au3>

$main_GUI = GUICreate("Coaster Leech",231,341); will create a dialog box that when displayed is centered
GUICtrlCreateLabel ("", 10,10,211,60)
GUICtrlSetBkColor(-1,0xffff00); yellow.  For the image
; comment the following two lines to get the buttons to work again.
 GUICtrlSetBkColor(-1,0xffffff); white
; end comment section.
$button_banlist = GUICtrlCreateButton("View &Bans",15,85,65,20)
$button_config = GUICtrlCreateButton("&Config",151,85,65,20)

GUISetState ()

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
        Case $msg = $GUI_EVENT_CLOSE
        Case $msg = $button_banlist
            MsgBox(0,"Banlist","Insert Banlist GUI here")
        Case $msg = $button_config
            MsgBox(0,"Configuration","Config GUI goes here")

I've got a work around, lots of extra coding to make a "hole" for the button(s) to sit in, but......I'd rather not if there's a simpler way.

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to post
Share on other sites

Put the following after each GuiCtrlSetBkColor:

GuiCtrlSetState(-1, $GUI_DISABLE)

The other workaround would be to save your background as a *.bmp or *.gif image.


Worked like a charm, thanks CS. I'll have to remember that....

As far as the image is concerned, the yellow label in my example was a placeholder for an image. There will be 3 images that I'll have to Fileinstall() anyway, and don't want to bloat the distribution any more than necessary.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...