Jump to content
Sign in to follow this  
Awais

How to set transparent group label ?

Recommended Posts

Awais

how to set transparent group label background color

:ermm:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
Local $Form1 = GUICreate("Testing", 615, 437, 192, 124,-1,BitOR($WS_EX_APPWINDOW,$WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE))
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
GUICtrlCreatePic("c:\wall.jpg",0,0,615,437)
GUICtrlSetState(-1,$GUI_DISABLE)
Local $Group1 = GUICtrlCreateGroup("Group1 BK", 80, 64, 265, 169)

GUICtrlSetBkColor($Group1,$GUI_BKCOLOR_TRANSPARENT) ; ;; Here

GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    Sleep(100)
WEnd

Func Form1Close()
    Exit
EndFunc

bd6232e5_o.jpeg

Edited by Awais

Share this post


Link to post
Share on other sites
Zedna

This is quick hack with group without title and another transparent label as title
disadvantage is that line of groupbox is drawn also at area of transparent label/title
 

...
;~ Local $Group1 = GUICtrlCreateGroup("Group1 BK", 80, 64, 265, 169)
Local $Group1 = GUICtrlCreateGroup("", 80, 64, 265, 169)
GUICtrlSetBkColor($Group1,$GUI_BKCOLOR_TRANSPARENT) ; ;; Here
GUICtrlCreateLabel("Group1 BK", 80+10, 64, 265, 169)
GUICtrlSetColor(-1,0x00ff00) ; change color of title for better readability
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) ; ;; Here
...

Share this post


Link to post
Share on other sites
Awais

Is there anyothere way to change group title to transparent ?

Share this post


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
Sign in to follow this  

×