|
View:
New views
18 Messages
—
Rating Filter:
Alert me
|
|
|
Problems with ComboBoxEx width and content of the fieldHello,
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 qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
Re: Problems with ComboBoxEx width and content of the fieldHi,
Issue #1) I will enhance the showOnTextField property with one more value. I will start probably next week. It will be an easy modification. Issue #2) Try setting the width of the edit field to '1*' comboBoxEx.getField().setWidth('1*')
|
|
|
Re: Problems with ComboBoxEx width and content of the field>
Hello, thank you for your help, it is really appreciated! I have tried to set the width to "1*" as you suggested, unfortunately this results in weird behaviour. Now the field fills out the column as it should, but the button is in the middle of the field. The drop-down box still shows normally. If I make the browser window bigger, then the field resizes normally, the button stay at the same position relative to the left edge of the widget. If I make the browser window smaller, the field will still be resized corectly, the button will still be at the same position relative to the left edge of the widget, but the text in the field wont' be truncated at the right edge of the field. Regards, Daniel Haferkorn dperez <craquerpro <at> yahoo.es> writes: > > > Hi, > > Issue #1) I will enhance the showOnTextField property with one more value. > I will start probably next week. It will be an easy modification. > > Issue #2) Try setting the width of the edit field to '1*' > comboBoxEx.getField().setWidth('1*') > ------------------------------------------------------------------------- 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 qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
Re: Problems with ComboBoxEx width and content of the field> The other problem is with the width of the ComboBoxEx widget.
I also have a problem with this, with a ComboBoxEx within a grid. It's at the right-hand side of the grid, and the buttons outside of the grid mean that scrollbars are added to the grid by the browser. Not what I want in a dialog box! If I set the grid column to a width of 200 pixels, the drop-down button remains at the same point but the edit box extends underneath it for the whole width: +---------+---+------------+ | | v | | +---------+---+------------+ This is probably related to the Classic appearance having: "combo-box-ex-text-field" : { <snip> initial : function(vTheme) { return qx.lang.Object.mergeWith(vTheme.initialFrom("text-field"), { border : qx.renderer.border.BorderPresets.getInstance().none, minWidth : 30, width : 100, It makes it very difficult to use the combo box in a dialog, if you are trying to automatically layout the dialog rather than setting absolute positions. > Also, how can I change the width of the drop-down list? I would also like to know this. Also, the key sequence alt + down arrow will open the drop-down list as normal (in Windows) but it also results in the next item being selected in the list. Hugh ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
Re: Problems with ComboBoxEx width and content of the fieldI'm also investigating this issue.
I can reproduce it. I have commented out the minWidth and width in the classic appearance, and still have the same problem.
|
|
|
Re: Problems with ComboBoxEx width and content of the field> I'm also investigating this issue.
> I can reproduce it. > I have commented out the minWidth and width in the classic > appearance, and > still have the same problem. Shall I raise some issues to cover the items concerned? - layout - width of dropdown - extra selection with keyboard Hugh ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
Re: Problems with ComboBoxEx width and content of the fieldHi Hugh,
With this sample: ComboBoxEx_2.html The layout of the combo isn't right. Diagnostic: In the firebug console we see: combo.getWidth() == 'auto' combo.getField().getWidth() == 'auto' combo.getButton().getWidth() == 'auto' Solution If we call in the console this: combo.setWidth('100%'); // Alternatively we can use combo.setWidth(100), as 100==the width of the column combo.getField().setWidth('1*'); qx.ui.core.Widget.flushGlobalQueues(); Then it is rendered ok! :-) Hope this helps
|
|
|
Re: Problems with ComboBoxEx width and content of the fieldDone in SVN, ComboBoxEx.showOnTextField property has now a new possible value: 'id' !
Revision 7319 of qooxdoo 0.6.x. Now I'm going to update the trunk...
|
|
|
Re: Problems with ComboBoxEx width and content of the field> Solution
> > If we call in the console this: > > combo.setWidth('100%'); // Alternatively we can use > combo.setWidth(100), as > 100==the width of the column > combo.getField().setWidth('1*'); > qx.ui.core.Widget.flushGlobalQueues(); > > Then it is rendered ok! :-) Yep, confirmed here. I added a snippet about it at http://qooxdoo.org/documentation/snippets/comboboxex_in_gridlayout Is that change compatible with other normal uses of the combo? How, in other words, can the details be hidden from normal users in the future, so they can just drop a combo box or ComboBoxEx into a form and just have it work? However, the drop-down list is still not the full width of the edit control. How do I make it the full width? And there is still the problem of the keyboard activation of the drop-down list using alt+down arrow. Hugh ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
Re: Problems with ComboBoxEx width and content of the fieldHi,
thanks for this workaround, it's working fine here. :) Regards, Daniel Haferkorn dperez wrote: > Hi Hugh, > > With this sample: > > http://www.nabble.com/file/7908/ComboBoxEx_2.html ComboBoxEx_2.html > > The layout of the combo isn't right. > > Diagnostic: > > In the firebug console we see: > > combo.getWidth() == 'auto' > combo.getField().getWidth() == 'auto' > combo.getButton().getWidth() == 'auto' > > > Solution > > If we call in the console this: > > combo.setWidth('100%'); // Alternatively we can use combo.setWidth(100), as > 100==the width of the column > combo.getField().setWidth('1*'); > qx.ui.core.Widget.flushGlobalQueues(); > > Then it is rendered ok! :-) > > Hope this helps > > > Hugh Gibson wrote: >>> I'm also investigating this issue. >>> I can reproduce it. >>> I have commented out the minWidth and width in the classic >>> appearance, and >>> still have the same problem. >> Shall I raise some issues to cover the items concerned? >> >> - layout >> - width of dropdown >> - extra selection with keyboard >> >> Hugh >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> qooxdoo-devel mailing list >> qooxdoo-devel@... >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >> >> > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
Re: Problems with ComboBoxEx width and content of the fielddperez wrote:
> Done in SVN, ComboBoxEx.showOnTextField property has now a new possible > value: 'id' ! > Revision 7319 of qooxdoo 0.6.x. > > Now I'm going to update the trunk... > Hi, thanks for the feature update, it's working great! Now the only thing that bothers me is the width of the ComboBoxEx list, which is too short when I display both the id and the description in it by using combo.setIdColumnVisible(true); Because the list width is now too small, the horizontal scroll bar is shown. And is it possible to hide the column headers in the list somehow? Regards, Daniel Haferkorn ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
Re: Problems with ComboBoxEx width and content of the fieldGood idea the snippet inserted in the wiki. Next time I will do so.
One possible solution for easing this issue is to have this as default values: minWidth of the textbox set to some reasonable value, width='1*' width combo = 'auto' width button = 'auto' so the only setting for setting it inside a GridLayout is to set the combo width=100%. If I click the combo (or press tab until the combo has the focus), and press Alt-Down, the list is shown. Drop-down list width is determined automatically to the needed width.
|
|
|
Re: Problems with ComboBoxEx width and content of the fieldIn my case, the width of the list box is determined automatically, in any case.
Are you calling combo.setIdColumnVisible(true) before the combo is visible, i.e. the List is built? The table class that is used by ComboBoxEx has some problems with changing dynamically some properties. If these problems aren't solved, I will recreate the table. Headers are hidden automatically when there is only one column. You can hide them with this code: combo.getList().getPaneScroller(0).getHeader().setHeight(1);
|
|
|
Re: Problems with ComboBoxEx width and content of the fielddperez wrote:
> In my case, the width of the list box is determined automatically, in any > case. > > Are you calling combo.setIdColumnVisible(true) before the combo is visible, > i.e. the List is built? > The table class that is used by ComboBoxEx has some problems with changing > dynamically some properties. If these problems aren't solved, I will > recreate the table. > > Headers are hidden automatically when there is only one column. > You can hide them with this code: > combo.getList().getPaneScroller(0).getHeader().setHeight(1); > Hello, thanks for your ongoing support, I really appreciate it! I was calling combo.setIdColumnVisible(true) before calling combo.setSelection(testData). I switched the order of those calls now, but nothing in the display changed, the width of the list is still too small. Also the call of combo.getList().getPaneScroller(0).getHeader().setHeight(1); doesn't seem to have any effect and I don't know why. If I change the appropriate line (526) in the sourcecode for the ComboBoxEx.js to never display the header, then it works. Now when the header is gone, the width of the list is suddenly ok, I guess it has something to do with the width of the header itself. Regards, Daniel Haferkorn ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
Re: Problems with ComboBoxEx width and content of the field> If I click the combo (or press tab until the combo has the focus),
> and press Alt-Down, the list is shown. When I do that (in IE7 and FF2) the list is shown but also the next item is selected in the list. So it changes your selection. Using tab to navigate is broken as well. Firstly, there is a dead spot - tab out of the combo, and focus disappears somewhere. Tab again, and focus is shown in the next control. Secondly, if you drop the list (using keyboard and mouse) and try to move on to the next control using tab then the selection in the list is suddenly shown in the standard Windows selection colour, and navigation keys have no effect (up/down arrow, tab). It only seems to work if you drop the list, change the selection, and then press "Enter". The drop-down list disappears, and tab works (as before, with missing focus at first). > Drop-down list width is determined automatically to the needed width. It's way too narrow. It should default to the width of the edit box, and be longer if needed. Hugh ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
Re: Problems with ComboBoxEx width and content of the fieldHi,
I have plans to improve all these areas. I'll wait a little till version 0.7 is more stable.
|
|
|
Re: Problems with ComboBoxEx width and content of the field> I have plans to improve all these areas.
> I'll wait a little till version 0.7 is more stable. OK, thanks. Hugh ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
Re: Problems with ComboBoxEx width and content of the fieldHi
I also had the problem with the width of ComboBoxEx in a GridLayout. My question: Is it necessary, to set the width of the field in the appearance? IMHO "combo-box-ex-text-field" should define width : "1*", instead of width : 100, then the problems are solved. Can you agree? Erich dperez schrieb: > Solution > > If we call in the console this: > > combo.setWidth('100%'); // Alternatively we can use combo.setWidth(100), as > 100==the width of the column > combo.getField().setWidth('1*'); > qx.ui.core.Widget.flushGlobalQueues(); > > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
| Free embeddable forum powered by Nabble | Forum Help |