p)(d Posted September 14, 2006 Posted September 14, 2006 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
jvanegmond Posted September 14, 2006 Posted September 14, 2006 (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 September 14, 2006 by Manadar github.com/jvanegmond
p)(d Posted September 14, 2006 Author Posted September 14, 2006 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
p)(d Posted September 14, 2006 Author Posted September 14, 2006 i tryed to find my $label with #Include<Array.au3> _ArraySearch but seems to work only with one dimension. got some errormsg... SYS 64738
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