OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Danner on July 01, 2014, 05:01:40 AM

Title: Determine ListView/ListBox Height at Runtime
Post by: Danner on July 01, 2014, 05:01:40 AM
Hi,

I was wondering if anyone knew of a "cast iron" way to precisely determine the required height of a ListView/ListBox item at runtime based upon the number of rows in the list.

I looked at the "FontSize" and "IconYSpacing" properties eg (setq Height (* (dcl-ListView-GetCount ListView)(dcl-Control-GetProperty ListView "IconYSpacing"))). 

I could try to concoct an agorithm through trial and error, but I was wondering if there was a better way?



Title: Re: Determine ListView/ListBox Height at Runtime
Post by: owenwengerd on July 01, 2014, 07:51:53 AM
I think that will be rather difficult. You'll also need to account for screen resolution, themes, and user settings affecting the sizes of various parts of the controls.
Title: Re: Determine ListView/ListBox Height at Runtime
Post by: Danner on July 01, 2014, 08:22:44 AM
Ok, thanks Owen. :(