[JW Lua] Dynamic dialog sizing

Aaron Sherber aaron at sherber.com
Fri Feb 24 18:43:47 CET 2023


Hi all,

I see that a couple of places in the library multiply character count by 6
in order to get control length. Is that a reasonable approximation for the
default text fonts?

Thanks,
Aaron.




On Fri, Feb 24, 2023 at 8:51 AM Aaron Sherber <aaron at sherber.com> wrote:

> 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/51ee93f1/attachment.html>


More information about the JWLua mailing list