Sign in to follow this  
Followers 0
beast

Change text colour on GUICtrlCreateGroup

4 posts in this topic

#1 ·  Posted (edited)

Hi, I try to change text colour on GUICtrlCreateGroup, but I cant get this to work.

 

I use

$Group1 = GUICtrlCreateGroup("Program som är öppna är följande", 32, 112, 393,89)

To create

And for the button

$Button2 = GUICtrlCreateButton("Fortsätt", 376, 216, 97, 25,$WS_GROUP)
GUICtrlSetOnEvent($Button2, "_Exit")
;Function to close the entire program
Func _Exit()
 if ProcessExists($CMDLINE[2]) then
  GUICtrlSetColor($Group1,0xFF0000)
 Else   
  Exit
EndIfEndFunc 
;==>_Exit

Button work and my program while not close if ProcessExists, But it don't change colour to red on Group.

Is there some refresh I need to do, I cant found somthing to refresh forms or GUICtrlCreateGroup.

So please help me.

Edited by beast

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi,

Please use autoit code tags to post your code.

You need to add this after the group control :

DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Group1), "wstr", 0, "wstr", 0)

_

Br, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Sorry I while use Autoit Code Tags next time.

And your help work, Thanks.

$Group1 = GUICtrlCreateGroup("Program som är öppna är följande", 32, 112, 393, 89)
 GUICtrlCreateGroup("", -99, -99, 1, 1)
 DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Group1), "wstr", 0, "wstr", 0)
Edited by beast

Share this post


Link to post
Share on other sites

Btw,

This line is useless :

GUICtrlCreateGroup("", -99, -99, 1, 1)

The DllCall targets the group $Group1 ;)

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

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  
Followers 0