Re: [Class] ImageButton
Posted: 06 Mar 2014, 02:30
The current version fills the button's background with the AHK default window color:
This has visibly effects only for rounded buttons or transparent colors. If you assign a different background color with Gui, Color, %MyGuiColor%, you should set this color as default by calling MyImageButton.SetGuiColor(MyGuiColor) or specify it in the 6th entry of the option parameters in these cases.
Drawing only a border around a common push button is not a task Class_ImageButton has been designed for.
Code: Select all
InitClass() {
; ----------------------------------------------------------------------------------------------------------------
; Get AHK's default GUI background color
GuiColor := DllCall("User32.dll\GetSysColor", "Int", 15, "UInt") ; COLOR_3DFACE is used by AHK as default
This.DefGuiColor := ((GuiColor >> 16) & 0xFF) | (GuiColor & 0x00FF00) | ((GuiColor & 0xFF) << 16)
Return True
}
Drawing only a border around a common push button is not a task Class_ImageButton has been designed for.