NetTalk Central

Author Topic: change the height of a drop list from 20 rec to 10  (Read 4373 times)

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
change the height of a drop list from 20 rec to 10
« 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: change the height of a drop list from 20 rec to 10
« Reply #1 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

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: change the height of a drop list from 20 rec to 10
« Reply #2 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: change the height of a drop list from 20 rec to 10
« Reply #3 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


Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: change the height of a drop list from 20 rec to 10
« Reply #4 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

springguy

  • Full Member
  • ***
  • Posts: 195
    • View Profile
    • Email
Re: change the height of a drop list from 20 rec to 10
« Reply #5 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: change the height of a drop list from 20 rec to 10
« Reply #6 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

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: change the height of a drop list from 20 rec to 10
« Reply #7 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.
  • 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


 
Rene Simons
NT14.14