Jump to content

Recommended Posts

Posted

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

Posted (edited)

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
Posted

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

Posted

i tryed to find my $label with

#Include<Array.au3>

_ArraySearch

but seems to work only with one dimension.

got some errormsg...

SYS 64738

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
×
×
  • Create New...