Ealric Posted February 6, 2008 Share Posted February 6, 2008 Can you set transparency on GuiCtrlCreateGroup? I've tried to do different things and if I can't set transparency, is there a way to change the font color from the default XP blue? See screenshot image of my app that I'm working on. It's an out of game macro creator for World of Warcraft (fully functional at the moment) that creates and manages in-game macros. I'm polishing it up a bit and still testing heavily but don't want to release it until it looks great. Any suggestions as to how I would work with this control to change either font or transparency parameters? Thanks in advance for any help or suggestions. My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic] Link to comment Share on other sites More sharing options...
GaryFrost Posted February 6, 2008 Share Posted February 6, 2008 GUICtrlSetBkColor using $GUI_BKCOLOR_TRANSPARENT should work SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Ealric Posted February 7, 2008 Author Share Posted February 7, 2008 (edited) GUICtrlSetBkColor using $GUI_BKCOLOR_TRANSPARENT should work Global $parent = GUICreate("WoW Macro Creator, Version: " & $version, 380, 682) GUISetBkColor($backgrndcolor) GUISetIcon($iconpath) ; Define top most image for the GUI interface GUICtrlCreatePic($Logo_back, 1, 1, 380, 440, $SS_SUNKEN) GUICtrlSetState($Logo_back, $GUI_DISABLE) GUICtrlCreateGroup($general, 10, 10, 361, 190) GUICtrlSetBkColor($general, $GUI_BKCOLOR_TRANSPARENT) I've already tried that and a few other things as well. This above does not work. Default state is still relative to the background color of the gui itself. Not sure why it does this. Keep in mind that I do have a background color set and an image set per the picture I enclosed above. Even if I remove the background color, it would then default to the slate gray look with blue font. The image is applied before the control is placed for the group so the group is on top of the image, or that's how it should be relative. Transparency should then apply to the image should it not? I'm using the latest public version of autoit too 3.2.10.0 (non-beta version) The above code snippet is the default order the background color / image / group is being applied, although there are other controls inbetween all of this. Edited February 7, 2008 by Ealric My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic] Link to comment Share on other sites More sharing options...
GaryFrost Posted February 7, 2008 Share Posted February 7, 2008 Global $parent = GUICreate("WoW Macro Creator, Version: " & $version, 380, 682) GUISetBkColor($backgrndcolor) GUISetIcon($iconpath) ; Define top most image for the GUI interface GUICtrlCreatePic($Logo_back, 1, 1, 380, 440, $SS_SUNKEN) GUICtrlSetState($Logo_back, $GUI_DISABLE) GUICtrlCreateGroup($general, 10, 10, 361, 190) GUICtrlSetBkColor($general, $GUI_BKCOLOR_TRANSPARENT) I've already tried that and a few other things as well. This above does not work. Default state is still relative to the background color of the gui itself. Not sure why it does this. Keep in mind that I do have a background color set and an image set per the picture I enclosed above. Even if I remove the background color, it would then default to the slate gray look with blue font. The image is applied before the control is placed for the group so the group is on top of the image, or that's how it should be relative. Transparency should then apply to the image should it not? I'm using the latest public version of autoit too 3.2.10.0 (non-beta version) The above code snippet is the default order the background color / image / group is being applied, although there are other controls inbetween all of this. IIRC a group control is really a button control, so I believe transparancy would be a tough one, maybe it can be done with owner drawn SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
GaryFrost Posted February 7, 2008 Share Posted February 7, 2008 Here's something I was messing around with 3 or 4 years ago, a little tweaking and it should work like you want. expandcollapse popup#include <GUIConstantsEx.au3> #include <WinAPI.au3> Dim $W_HEIGHT = 300, $W_WIDTH = 500, $TITLE = "Graphic Edge Demo" ;================================================================== ; create the Main window ;================================================================== $MAIN_WINDOW = GUICreate($TITLE,$W_WIDTH,$W_HEIGHT) GUICtrlCreatePic(@Systemdir & "\oobe\images\mslogo.jpg", 20, 20, 200, 50) $hctrl = _GUICtrlCreateGroupBox("My Group", 25, 25, 2, 190, 40) GUICtrlSetColor($hctrl, 0xff0000) $EXIT = GUICtrlCreateButton("E&xit", 310, $W_HEIGHT - 40, 120, 25) GUISetState(@SW_SHOW, $MAIN_WINDOW) Do $MSG = GUIGetMsg() Select Case $MSG = $EXIT ExitLoop Case Else ; EndSelect Until $MSG = $GUI_EVENT_CLOSE ;=============================================================================== ; ; Description: _GUICtrlCreateEdge "Create an edge line from a label" ; Parameter(s): $i_x - left ; $i_y - top ; $i_width - width ; $i_height - height ; $v_color - color ; Requirement: none ; Return Value(s): none ; User CallTip: none ; Author(s): layer ; Note(s): all the following were inspired by this simple function ; ;=============================================================================== ; Insert script here. #EndRegion Func _GUICtrlCreateEdge($i_x, $i_y, $i_width, $i_height, $v_color) GuiCtrlCreateGraphic($i_X, $i_Y, $i_Width, $i_Height,0x1000) GUICtrlSetBkColor(-1,$v_color) EndFunc #Region - ;=============================================================================== ; ; Description: _GUICtrlCreateEdgeBox ; Parameter(s): $i_x - left ; $i_y - top ; $i_weight - line weight ; $i_width - width ; $i_height - height ; $v_color - color ; Requirement: GUICtrlCreateEdge ; Return Value(s): none ; User CallTip: none ; Author(s): Gary Frost (gary.frost@arnold.af.mil) ; Note(s): ; ;=============================================================================== ; Insert script here. #EndRegion Func _GUICtrlCreateEdgeBox($i_x,$i_y,$i_weight,$i_width,$i_height,$v_color) ; left vertical line _GUICtrlCreateEdge($i_x, $i_y, $i_weight, $i_height, $v_color) ; top horizontal line _GUICtrlCreateEdge($i_x, $i_y, $i_width, $i_weight, $v_color) ; right vertical line _GUICtrlCreateEdge($i_width + $i_x - 1, $i_y, $i_weight, $i_height, $v_color) ; bottom horizontal line _GUICtrlCreateEdge($i_x, $i_height + $i_y - 1, $i_width + $i_weight - 1, $i_weight, $v_color) EndFunc Func _GUICtrlCreateGroupBox($sText, $i_x,$i_y,$i_weight, $i_width, $i_height,$v_color=-1) Local $hdc = _WinAPI_GetDC(0) Local $tSize = _WinAPI_GetTextExtentPoint32($hdc, $sText) If($v_color == -1) Then $v_color = 0x000000 ; left vertical line _GUICtrlCreateEdge($i_x, $i_y, $i_weight, $i_height, $v_color) Local $h_ctlid = GUICtrlCreateLabel($sText, $i_x + 4, $i_y - (DllStructGetData($tSize, "Y")/2)) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) ; top horizontal line _GUICtrlCreateEdge($i_x + DllStructGetData($tSize, "X") - 4, $i_y, $i_width - DllStructGetData($tSize, "X") + 4, $i_weight, $v_color) ; right vertical line _GUICtrlCreateEdge($i_width + $i_x - 1, $i_y, $i_weight, $i_height, $v_color) ; bottom horizontal line _GUICtrlCreateEdge($i_x, $i_height + $i_y - 1, $i_width + $i_weight - 1, $i_weight, $v_color) Return $h_ctlid EndFunc SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Ealric Posted February 7, 2008 Author Share Posted February 7, 2008 Thanks for the help Gary. I'll take a look at it in the morning and see how it goes. Take care mate. My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic] Link to comment Share on other sites More sharing options...
Ealric Posted February 7, 2008 Author Share Posted February 7, 2008 Gary you are the man! Thanks a lot - this worked out great. It works perfectly over images and acts transparently with them. Appreciate the help. My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now