jQWidgets Forums
jQuery UI Widgets › Forums › Lists › ComboBox › Couple of problems
Tagged: combobox control width percent
This topic contains 3 replies, has 2 voices, and was last updated by spekary 11 years, 11 months ago.
-
AuthorCouple of problems Posts
-
If you have a combobox that has a width of 100%, and which is inside a table cell, if the table grows, then the combobox grows, but the arrow does not move, and the arrow looks like its floating in the middle of the combobox. I believe the problem is that the arrow is positioned absolutely with a computed left value. I think it should instead be given a right value of zero, and no left value, but that is just a guess.
Hi spekary,
If you report an issue regarding our products, please include the following information in your post:
– jQuery version, jQWidgets version, device type(PC, Mobile), browser name and version.
– Please, provide step by step instructions on how to reproduce the reported issue and provide a small sample which demonstrates it.Below is a working sample with jQWidgets 2.8. The ComboBox is in a Table Cell.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/jquery-1.8.3.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcombobox.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxpanel.js"></script></head><body> <script type="text/javascript"> $(document).ready(function () { var source = [ "Affogato", "Americano", "Bicerin", "Breve", "Café Bombón", "Café au lait", "Caffé Corretto", "Café Crema", "Caffé Latte", "Caffé macchiato", "Café mélange", "Coffee milk", "Cafe mocha", "Cappuccino", "Carajillo", "Cortado", "Cuban espresso", "Espresso", "Eiskaffee", "The Flat White", "Frappuccino", "Galao", "Greek frappé coffee", "Iced Coffee", "Indian filter coffee", "Instant coffee", "Irish coffee", "Liqueur coffee" ]; // Create a jqxComboBox $("#jqxComboBox").jqxComboBox({ source: source, selectedIndex: 0, width: '100%', height: '25px'}); }); </script> <table style="width: 100%;"> <tr> <td><div id='jqxComboBox'></div></td> </tr> </table></body></html>
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comSorry about that. Using jqwidgets 2.8 and have tried 1.8.3 and 1.9.2 of jQuery.
Thank you for your example, it was very helpful. Your example works, but the following does not work:
Change
$(“#jqxComboBox”).jqxComboBox({ source: source, selectedIndex: 0, width: ‘100%’, height: ’25px’});
to
$(“#jqxComboBox”).jqxComboBox({ source: source, selectedIndex: 0, height: ’25px’});
and then
to
You will then see the error I am seeing
Also, if you use a ajax dataAdapter with your example, and set the width to 100%, you will get an error: virtualSize undefined.
Platform: Mac 10.6, reproduced in Safari and Firefox for both problems.
Sorry again. It looks like parts of my code did not come through. What I was doing was setting the div to 100% width that has the id of #jqComboBox, and taking out the 100% width in the jqxComboBox call.
How did my previous post violate the EULA?
-
AuthorPosts
You must be logged in to reply to this topic.