This content has been marked as final. Show 6 replies
> Can you limit the view of the drop down list to 4 lines? If I have a drop downlist of the 50 states can I limit the view to 4 or 5 at a time with a scroll?
I don't know how easy it might be to alter the dropdown list behavior to
achieve what you need (as you asked in another thread), but you might
consider looking at the OSControlas xtra < http://xtras.openspark.com>
The dropdown list behavior available in my behavior library will do what you
need... though it's more manual to set up at first. You can check it out
though. Grab my Utilities cast from: www.blurredistinction.com/director
Let me know how it works for you.
Adobe Community Expert
I wonder if there was an assignment that had to do with dropdown list behavior since there seems to be a burst of questions suddenly about that behavior?
The Dropdown List behavior is not designed to show only a limited number of lines. It is designed to show as many items as possible. If the height of the Stage is reduced, it will show fewer lines. One solution would be to place the Dropdown List sprite in a MIAW whose height is limited. Another solution would be to look at the code and work out how the height of the sprite is determined.
Thanks everyone for your help
It looks like the dropdown list behavior uses the properties myStageHeight and myItemHeight to determine the vertical dimensions of the list. It doesn’t look like it would be too difficult to hack the openList handler to use myItemHeight * 4 rather than myStageHeight as the maximum vertical dimension.