Jump to content

get bkground color from label?


p)(d
 Share

Recommended Posts

hi,

i have a program with lot of labels.

the labels are changing color on certain events with: GUICtrlSetBkColor($Label[$X][$Y],$newColor)

is it possible to make something like GUICtrlGetBkColor($Label[$X][$Y]), maybe a workaround?

thanks a lot

p)(d

SYS 64738

Link to comment
Share on other sites

I would work around like this:

Replace all instances of $Label[$X][$Y] by $Label[$X][$Y][0]

Replace all instances of

GUICtrlSetBkColor($Label[$X][$Y],$newColor)
by

GUICtrlSetBkColor($Label[$X][$Y][0],$newColor)
$Label[$X][$Y][1] = $newColor

Then you just read $Label[$x][$y][1] for the color of that label.

Alternately, you can create a function that does this:

Func GUICtrlGetBkColor($x,$y)
        Return $label[$x][$y][1]
EndFunc
Edited by Manadar
Link to comment
Share on other sites

wow - fast answer - thank you!

this will do for some of my labels,

but i change some labels like this:

$CursorInfo=GUIGetCursorInfo()

GUICtrlSetBkColor($CursorInfo[4],$newColor)

any idea how to get the $Label[$X][$Y][0] ?

SYS 64738

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...