#1824 closed Bug (Works For Me)
$GUI_BKCOLOR_TRANSPARENT not working in GUICtrlCreateCheckbox
Reported by: | avechuche | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.3.6.1 | Severity: | None |
Keywords: | Cc: |
Description
I have a problem or bug (?). I have a GUI with a background image, and need a transparent checkbox, but the "special flag" GUICtrlCreateCheckbox, not working. my au3 line is:
...
GUICtrlCreatePic("picture.jpg", 0, 0, @DesktopWidth, @DesktopHeight)
GUICtrlSetState(-1, $GUI_DISABLE)
...
GUICtrlCreateCheckbox("xxxx", 10, (@DesktopHeight - 100), -1, 20)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
...
In "Autoit Help" say this in GUICtrlSetBkColor section
"The special flag $GUI_BKCOLOR_TRANSPARENT can be used with the Label, Group, Radio, Checkbox to apply to them a transparent background color".
My solution?
GUICtrlCreateCheckbox("", 10, (@DesktopHeight -100), 13, 13)
GUICtrlCreateLabel("", 30, (@DesktopHeight - 100), 122, 13)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
But is very irritating i have many checkbox :(
Attachments (0)
Change History (10)
comment:1 in reply to: ↑ description ; follow-up: ↓ 2 Changed 14 years ago by mvg
comment:2 in reply to: ↑ 1 Changed 14 years ago by anonymous
Replying to mvg:
Replying to avechuche:
I have a problem or bug (?)
<snip>
But is very irritating i have many checkbox :(
Sorry to hear that.
Anyway, Welcome to the forum ... O wait, this is not the forum.
Goto forum. Its very irritating to see meaningless reports like these.
Its a Autoit bug, , so I write here.
comment:3 Changed 14 years ago by mvg
- What bug? (clear, to the point description.)
- Proof it! (runnable example code.)
- Additional system specs that might matter. (like: "Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 3 CPU:X86 OS:X86)")
From my point of view. Things seem to be working fine.
example() If @error Then MsgBox(0,'MsgBox',@error) Func example() GUICreate('GUI') GUISetBkColor(0x88FF88) Local $tmp = StringTrimRight(@AutoItExe, StringLen('\autoit3.exe')) & '\Examples\GUI\msoobe.jpg' ;; msoobe.jpg, logo4.gif If Not FileExists($tmp) Then Return SetError(9601) ;; file note found. (need image!) $tmp = GUICtrlCreatePic($tmp, 0, 0, 400, 200) GUICtrlCreateCheckbox("Checkbox1", 50, 50, 100, 50) GUICtrlSetBkColor(-1, 0xFF8888) GUICtrlCreateCheckbox("Checkbox2", 50, 250, 100, 50) GUICtrlSetBkColor(-1, 0xFF8888) GUICtrlCreateCheckbox("Checkbox3", 250, 50, 50, 50) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlCreateCheckbox("Checkbox4", 250, 250, 50, 50) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUISetState() Do Until GUIGetMsg() = -3 EndFunc
comment:4 follow-up: ↓ 5 Changed 14 years ago by mvg
oOps
#include <GUIConstantsEx.au3>
comment:5 in reply to: ↑ 4 Changed 14 years ago by anonymous
Replying to mvg:
oOps
#include <GUIConstantsEx.au3>
Bug: $GUI_BKCOLOR_TRANSPARENT not work with GUICtrlCreateCheckbox. I need transparent CreateCheckbox to use a background image
Not work! (your code)
http://picturetogo.com/images/2010/11/24/2689-dibujo.jpg
comment:6 Changed 14 years ago by mvg
My code works fine. As I have no black background on those left-sided Checkbox's. The Right-sided Checkbox's are suppose to be red.
Problem is on your side/system, also know as a local problem.
Ergo:
- Additional system specs that might matter.
That would be your video specs and used driver.
Bottom line: If Dev's don't know how to, or can't, reproduce it. It will definitely not be fixed/changed.
For Dev's, from screen shot:
Environment(Language:0C0A Keyboard:0000040A OS:WIN_XP/Service Pack 3 CPU:X64 OS:X86)
I'm out.
Problem is cleared up as far as I'm concerned.
comment:7 Changed 14 years ago by mvg
Did It again ... Mixed up Left and Right side. :P
comment:8 in reply to: ↑ description Changed 14 years ago by anonymous
Replying to avechuche:
I have a problem or bug (?).
If you are not sure if it's a bug or not then you should not post here but the forum, as it's most likely NOT a bug. Like in this case, you just need to disable themes for the transparency to work.
Example:
#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstantsEx.au3> example() If @error Then MsgBox(0,'MsgBox',@error) Func example() GUICreate('GUI') GUISetBkColor(0x88FF88) Local $tmp = StringTrimRight(@AutoItExe, StringLen('\autoit3.exe')) & '\Examples\GUI\msoobe.jpg' ;; msoobe.jpg, logo4.gif If Not FileExists($tmp) Then Return SetError(9601) ;; file note found. (need image!) $tmp = GUICtrlCreatePic($tmp, 0, 0, 400, 200) GUICtrlCreateCheckbox("Checkbox1", 50, 50, 100, 50) GUICtrlSetBkColor(-1, 0xFF8888) GUICtrlCreateCheckbox("Checkbox2", 50, 250, 100, 50) GUICtrlSetBkColor(-1, 0xFF8888) GUICtrlCreateCheckbox("Checkbox3", 250, 50, 50, 50) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle(-1), "wstr", 0, "wstr", 0) GUICtrlCreateCheckbox("Checkbox4", 250, 250, 50, 50) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUISetState() Do Until GUIGetMsg() = -3 EndFunc
comment:9 Changed 14 years ago by Jpm
- Resolution set to Works For Me
- Status changed from new to closed
For me it is working so I close it
comment:10 Changed 7 years ago by ratus
"you just need to disable themes for the transparency to work."
Thanks a lot for this valuable info !!!
I've been searching on the forum but didn't get any solution !
Big thanks again !
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Replying to avechuche:
Sorry to hear that.
Anyway, Welcome to the forum ... O wait, this is not the forum.
Goto forum. Its very irritating to see meaningless reports like these.