[JW Lua] Dynamic dialog sizing

Aaron Sherber aaron at sherber.com
Fri Feb 24 14:51:02 CET 2023


Hi all,

I'm working with FCCustom(Lua)Window and having some difficulties with
sizing.

I want to display a static label on a dialog, but I don't know at design
time how long the text in the label is -- let's say it's a path+filename. I
don't see a way to make the FCCtrlStatic dynamically fit the length of the
text, or to make the overall width of the dialog fit the length of the
control.

Is there a good way to accomplish this? Or is my best bet to approximate
the needed control length in points based on the character count and then
set sizes based on that, hoping that everything works?

Thanks,
Aaron.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20230224/63d00c9a/attachment.html>


More information about the JWLua mailing list