Modify

Opened 15 years ago

Closed 15 years ago

Last modified 8 years ago

#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)

in reply to:  description ; comment:1 by mvg, 15 years ago

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.

in reply to:  1 comment:2 by anonymous, 15 years ago

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 by mvg, 15 years ago

  • 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 by mvg, 15 years ago

oOps

#include <GUIConstantsEx.au3>

in reply to:  4 comment:5 by anonymous, 15 years ago

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 by mvg, 15 years ago

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 by mvg, 15 years ago

Did It again ... Mixed up Left and Right side. :P

in reply to:  description comment:8 by anonymous, 15 years ago

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 by J-Paul Mesnage, 15 years ago

Resolution: Works For Me
Status: newclosed

For me it is working so I close it

comment:10 by ratus, 8 years ago

"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 !

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.