NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Robert Iliuta on December 04, 2012, 12:19:23 AM

Title: change the height of a drop list from 20 rec to 10
Post 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
Title: Re: change the height of a drop list from 20 rec to 10
Post by: Bruce on December 04, 2012, 04:18:09 AM
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
Title: Re: change the height of a drop list from 20 rec to 10
Post by: Robert Iliuta on December 04, 2012, 09:27:12 AM
>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
Title: Re: change the height of a drop list from 20 rec to 10
Post by: Bruce on December 04, 2012, 08:01:37 PM
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

Title: Re: change the height of a drop list from 20 rec to 10
Post by: Robert Iliuta on December 05, 2012, 12:39:00 AM
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
Title: Re: change the height of a drop list from 20 rec to 10
Post by: springguy on December 05, 2012, 10:04:07 AM
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
Title: Re: change the height of a drop list from 20 rec to 10
Post by: Bruce on December 06, 2012, 10:49:17 PM
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
Title: Re: change the height of a drop list from 20 rec to 10
Post by: Rene Simons on December 07, 2012, 02:18:30 AM
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.

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