Hi Erich, Erich Konicek wrote: > Hi! > > Is it possible in qx 0.8 Appearance definition to get the states of the > partent widget > inside the appearance definition of a sub widget? Yes, every sub-widget has access to all states set by the parent widget.
> E.g. > I want to change the background color or the icon in a checkbox widget > depending on the states of the checkbox. > Something like this: > > appearances : > ... > "checkbox/icon" : { > style : function(states) > { > return { > backgroundcolor : STATES_OF_CHECKBOX.disabled ? "disabled" : > undefined; > }; > } > }, > ... > > What's the way to do this? You have to use the "states" object given as parameter to the "style" method instead of using the "STATES_OF_CHECKBOX" variable. --snip-- "checkbox/icon" : { style : function(states) { return { backgroundcolor : states.disabled ? "disabled" : undefined; }; } }, --snip-- cheers, Alex P.S. I opened the bug #1470 ( http://bugzilla.qooxdoo.org/show_bug.cgi?id=1470 ) to ensure that the states of each widget are shown (again) in the API Viewer. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel