For any reason, I was not able to get a red line when using the Single  
decorator like that :

new qx.ui.decoration.Single.set({
                             color : "#FF0000"
                         });
or
new qx.ui.decoration.Single.set({
                             color : "#FF0000",
                             colorLeft : "#FF0000",
                             colorRight : "#FF0000",
                             colorTop : "#FF0000",
                             colorBottom : "#FF0000"
                         });
All that gave unvisible lines to the border or remove the border ...  
not sure.

I had to clone the used one to have my red line :
decorator.clone().set({
                             color : "#FF0000"
                         });

Anyway, it works fine but I just would like to make sure there is not  
something more to understand or eventually a bug behind that behavior.

On 25 Feb 2009, at 00:20, Jean-Baptiste BRIAUD -- Novlog wrote:

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


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