I was fighting to change the decorator properties ar runtime ... I  
understand now :-)
It works fine and I can reuse that decorator instance over widget,  
this is the perfect solution.

Big thanks !
On 24 Feb 2009, at 17:29, Fabian Jakobs wrote:

> Fabian Jakobs schrieb:
>> thron7 schrieb:
>>
>>> the most direct way would be to retrieve the current decorator of  
>>> the
>>> desired element (with .getDecorator()), and set its border color  
>>> to red.
>>>
>>>
>> Hold on, the properties of a decorator cannot be changed after  
>> creation.
>>
>>
>>
> To be more constructive - this is how I would do it. I would create a
> special decorator instance to draw the red border. You can define this
> decorator either in the theme or directly in the code.
>
> e.g.
>
> // this instance can be reused
> var errorDeco = new qx.ui.decorator.Single().set({
>  ... // some properties
> });
>
> // to draw the error line
> input.setDecorator(errorDecor);
>
> // to reset to the default decorator
> input.resetDecorator();
>
>
> Best fabian
>
>>>> 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
>>>>
>>>>
>>>>
>>>>
>>>>
>>> ------------------------------------------------------------------------------
>>> 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
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
> -- 
> Fabian Jakobs
> JavaScript Framework Developer
>
> 1&1 Internet AG - Web Technologies
> Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
> Telefon: +49 721 91374-6784
> [email protected]
>
> Amtsgericht Montabaur / HRB 6484
> Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich,  
> Thomas Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning  
> Kettler, Dr. Oliver Mauss, Jan Oetjen
> Aufsichtsratsvorsitzender: Michael Scheeren
>
>
> ------------------------------------------------------------------------------
> 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
>


------------------------------------------------------------------------------
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

Reply via email to