Discussion:
[Dojo-interest] Dropdown height for combobox/select?
koadam
2011-03-24 17:44:30 UTC
Permalink
Hi All,

I would like to ask you if there is a way to set the desired height of the
comboboxes dropdown menu?
I have a dijit.form.combobox (dojo1.5) with ~1500 items, and the dropdown
list is very large. (a few pixel always greater then the document so the
scrollbars on the page appears.)
So, maybe there is a trick, I can set it to show the dropdown e.g. only 200
pixels height?

I've tried it with FilteringSelect, results are the same.

Thanks in advance,
Koadam


--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Dropdown-height-for-combobox-select-tp2726239p2726239.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
Simon Speich
2011-03-24 21:41:39 UTC
Permalink
Try using CSS for that. I think it is:
#myWidgetId_popup {
height: 200px;
}

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Dropdown-height-for-combobox-select-tp2726239p2727425.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
vtsuper
2011-03-25 03:04:42 UTC
Permalink
district = new dijit.form.Select({
name:"district_id",
maxHeight:300,
},'district_id');


actually I suggest it should has a default maxHeight in the dijit will be
better

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Dropdown-height-for-combobox-select-tp2726239p2728864.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
Siqi
2011-03-25 04:32:47 UTC
Permalink
Post by vtsuper
district = new dijit.form.Select({
name:"district_id",
maxHeight:300,
},'district_id');
actually I suggest it should has a default maxHeight in the dijit will be
better
yes, I guess an extra parameter like 'autoHeight' in dojox grid could be
useful ?

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Dropdown-height-for-combobox-select-tp2726239p2729139.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
koadam
2011-03-27 12:22:40 UTC
Permalink
Hello,

thanks, that seems to be what I need, but....
..how can I use it, if my filteringSelect is declared in markup?

div dojoType="dijit.form.FilteringSelect" id="myID" maxHeight ="100"
style="max-height:100px; width: 100%;" required="true" searchAttr="..."
labelAttr="..." autoComplete="true" highlightMatch="all" query="{...: '*'}">


None of the two tries above worked.

Thanks in advance,
Koadam


--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Dropdown-height-for-combobox-select-tp2726239p2738753.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.

Loading...