Hello,

Another day, another problem:
Part of my application holds a GridLayout with several labels, text fields,
check boxes, a ComboBox and a ComboBoxEx.
I want to use the ComboBoxEx for a data type that has a code and a description,
so this widget seems to be a perfect match. :)

The first problem is that I would like to only display the code in the text
field and the code followed by the description in the drop-down box.
Unfortunately it is not possible to display only the id in the text field, only
either the description or the id with the description. I thought about just
switching the two parts of my data, so that I put the description in the
ComboBoxEx id and the code in the ComboBoxEx description. But then I would have
to change the order of the columns in the drop-down box so that the code comes
before the description. I currently don't see how I could achieve this.
I also don't know if it is a bad idea to switch the id and the description of
the widget in such a way.


The other problem is with the width of the ComboBoxEx widget. The description
texts are usually longer than the space that I have for the text field. I set
the width of the GridLayout columns before I add any widgets. When I add the
ComboBoxEx without changing the width, it is wider than the GridLayout column
that holds it and will overlap with the widget in the next colum. If I set the
size for the widget to 100% manually, then the text field of the ComboBoxEx
fills out the column and stays within it's limits, but the ComboBoxEx button is
still on the same position as where it was before, within the next column of the
GridLayout. Is this simply a bug? Or do I have to resize the widget in a special
way? Also, how can I change the width of the drop-down list?

Here's my current code snippet:
var coreLayout = new qx.ui.layout.GridLayout();
coreLayout.set({ width:"100%", height:"auto" });
coreLayout.setColumnCount(7);
coreLayout.setRowCount(3);
(...)
combo = new qx.ui.form.ComboBoxEx();
combo.setEnsureSomethingSelected(true);
combo.setAllowSearch(false);
combo.setMaxVisibleRows(6);
var testData = [
                [ 'A-0', 'some description' ],
                [ 'B-1', 'more description' ],
                [ 'B-1', 'descr.' ],
                [ 'B-2', 'TODO' ],
                [ 'C-0', 'description' ],
                [ 'D-1', 'final' ]
                ];
combo.setSelection(testData);
combo.setShowOnTextField("description");
combo.setWidth("100%");
coreLayout.add(combo, 2, 1);


I have also tried to encapsulate the ComboBoxEx within a BoxLayout widget and
put that in the column of the GridLayout, but to no avail.

Regards,
Daniel Haferkorn


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to