Page 1 of 1

PostPosted: Mon Jul 29, 2002 8:46 pm
by design4use
I need the NumVisible property of a UIList to be modifyable at runtime. When dynamically chnaging the list via UIList.setitems, there are times when there will only be a few items in a popup and times when there are many. However when I set NumVisible at design time to be fairly large to avoid scrolling with large numbers of items, the list displays an insightly empty area at the bottom at times when there are fewer items in the list then NumVisible.
Please consider it an enhancement request, or is it already possble to dynamically shrink and grow the visual size of the popup list?

Alternatively consider auto-shrinking done by the Orbworks runtime, like so:
if (numVisible > numItemsInList)numVisible = numItemsInList;
(auto shrink when number of items in list is smaller then NumVisible is specified).

Thanks for listening and making OrbForms kick butt!

PostPosted: Tue Jul 30, 2002 7:05 pm
by bobchernow
I had the same problem and worked around it by dynamically setting the h (height) value on the list to 12 * the number of entries. Granted this is pretty font specific but unless you are using non-standard fonts should not be to dificullt to calculate.

Bob Chernow

PostPosted: Tue Jul 30, 2002 8:21 pm
by design4use
somehow I tried this before but it never compiled. But it works now - thanks...BTW I recommend adding 2 or so px to .h to account for the border lines, other wise one less of your items will be displayed then are in the list.