Hi Jean-Baptiste,
Jean-Baptiste BRIAUD -- Novlog wrote:
> If I understood correctly the API, any widget have a getDecorator()
> method. It return "at least" a iDecorator instance.
> Unfortunatly, I can't see how to change the border on iDecorator,
> except maybe the tint method, but I have no idea witch element to
> provide ...
"iDecorator" is simply the Interface every decorator class has to
implement. The API should read "you get an instance which is implements
the interface 'iDecorator'".
> On the other hand, I also see the classes like Single, Double,
> Uniform, ... decorators, but I just don't know witch one will I
> encounter on a given widget...
> On Single, I see this property : color (Property group to set the
> border color of all sides) but how to esure Uniform will always be the
> widget's border ?
The answer is: you can't. At least not in a way that you call
"getDecorator" on a widget and can be sure you have an "Uniform"
decorator. You have to check for the decorator instance and modify only
the border at decorators which are capable of.
> Maybe I forgot to mention one point : I'm inside a generic method
> where all I know is that a widget parameter is a widget but it could
> be a table, a textarea, a textfield, any selectbox subclass, ...
Then you have to check for them as I already mentioned.
--snip--
if (widgetInstance.getDecorator() instanceof qx.ui.decoration.Uniform)
{
// code for uniform decorators
}
// etc.
--snip--
cheers,
Alex
>
> On 24 Feb 2009, at 14:06, thron7 wrote:
>
>> the most direct way would be to retrieve the current decorator of the
>> desired element (with .getDecorator()), and set its border color to
>> red.
>>
>> thomas
>>
>> Jean-Baptiste BRIAUD -- Novlog wrote:
>>> Hi,
>>>
>>> I'd like to add a red border to some field (in case of inproper user
>>> input) but I though it might be a bad idea to change the decorator
>>> since I don't have time for implementing my own decorator right now.
>>> Also, it won't be what I want to change the foreground or background
>>> color ...
>>>
>>> Any idea ?
>>>
>>> Thanks !
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel