NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Robert Iliuta on December 04, 2012, 12:19:23 AM
-
Hallo,
How can I change the height of a drop list. Now it show me 20 rec, I would like to show 10 rec.
I didn't find in template a setting for this.
Any tips appreciate,
Regards,
Robert
-
Hi Robert,
Drop lists are file loaded, so Are you wanting to reduce the number of lines in the drop, or the number of lines at one time (so then a scroll bar appears?)
cheers
Bruce
-
>the number of lines at one time
yes, ex if I have 100 recs in a drop list , I would like to show 10 then begin to scroll down ... now it will scroll after 20 recs.
Robert
-
ok - looks like I'll need to add an attribute to the control for that.
I think you can add the attribute in embed code, something like
size="10"
but to make it easier I'll need to add an attribute, and generate that for you.
cheers
Bruce
-
I try figure out where exactly I have to embed this one but cannot find.
Play with firebug no chance.
Let me know If it's a workaround or you can add this on the next build?
Thank you,
Robert
-
Bruce,
I've run into a similar need to reduce the displayed number of entries in the drop list, but allow scrolling. Could you help with where to embed your suggested limit?
Thanks,
Mike Springer
-
more research has shown this to not be possible.
The "size" attribute turns the drop-down into a list control (which is not what you're asking for here.)
And the Height CSS setting has no effect. see here for more;
http://stackoverflow.com/questions/570642/height-of-an-html-select-box-dropdown
-
Hi Robert,
Why don't you create a drop list and a lookup.
Use a condition to show them mutually exclusive, based on a function which counts the number of entries which are to appear in the list.
E.g.
- countMyDroplist() = 1 for the droplist
- countMyDroplist() = 0 for the lookup
The function should consist of something like:
if count(droplistfile) <= 10 ! **or some other counting mechnism
return(1)
else
return(0)
end
**
When you use a loop to count the number of valid entries for the list, you can stop counting as soon as the threshold is exceeded.
Kind regards
Rene