First off, I am still very early in learning stages, and am in fact editing/modifying an existing set of scripts to add additional functionality. I have run into an issue with a listbox whereby I wish to be able to adjust it's height according to list.items count. However, it always ends up as a single row instead of the normal height by line count.
Here is an example of what I have attempted to do:
listbox lbx_scripts "" height:25 -- this works and I wish 25 to be max size, but would also like to
-- adjust downwards if item count is less than 25
for j = 1 to displaylist.count do
(
format "Displaylist.count = %\r\n" displaylist.count --just to show actual list count
if displaylist.count <= 25 then lbx_scripts height: displaylist.count
else lbx_scripts height: 25
)
Of course the above fails with an error
-- Type error: Call needs function or class, got: ListBoxControl:lbx_scripts <<
I need to know how to access the "height:" property outside of the initial declaration. the listbox named lbx_scripts.height property is only in pixels which appears to be the only height I can adjust outside of that initial declaration line.
Is there anyway that I can access that property to adjust it programmatically?
By bannor9 · 2014-07-06
miauu · 2014-07-06