Seems to me like a bug.

Please try exchanging listbox with
var listbox = new qx.ui.form.List();
        // works as expected
and
var listbox = new qx.ui.form.ComboBox();
        // open the ComboBox to see unexpected results

Greetings
Stefan

Petr Kobalíček wrote:
> Hi,
> 
> I'm getting troubles with SelectBox with rich list items. Select box
> escapes the items. Is this bug?
> 
> Playground:
> 
> http://demo.qooxdoo.org/current/playground/#%7B%22code%22%3A%20%22var%2520doc%2520%253D%2520this.getRoot%28%29%253B%250A%250Avar%2520listbox%2520%253D%2520new%2520qx.ui.form.SelectBox%28%29%253B%250A%250Afor%2520%28var%2520i%2520%253D%25200%253B%2520i%2520%253C%252010%253B%2520i%252B%252B%29%250A%257B%250A%2520%2520var%2520item%2520%253D%2520new%2520qx.ui.form.ListItem%28%29%253B%250A%2520%2520item.setRich%28true%29%253B%250A%2520%2520item.setLabel%28%2522%253Cspan%2520style%253D%27color%253Ared%27%253E%2522%2520%252B%2520i%2520%252B%2520%2522%253C%252Fspan%2522%29%253B%250A%2520%2520listbox.add%28item%29%253B%250A%257D%250A%250Adoc.add%28listbox%252C%2520%257Bleft%253A50%252C%2520right%253A%252040%257D%29%253B%250A%250A%22%7D
> 
> Sample code:
> 
> var doc = this.getRoot();
> 
> var listbox = new qx.ui.form.SelectBox();
> 
> for (var i = 0; i < 10; i++)
> {
>   var item = new qx.ui.form.ListItem();
>   item.setRich(true);
>   item.setLabel("<span style='color:red'>" + i + "</span");
>   listbox.add(item);
> }
> 
> doc.add(listbox, {left:50, right: 40});
> 

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to