Hi everyone,
is it possible to script in the property browser 'fit to content' (when I hover over it the tooltip just shows either width or height but no 'fit to content' command?)
Thanks for any help.
Regards,
Glenn
Scripting 'fit to content'
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Scripting 'fit to content'
apologies, my question didn't make sense, what i meant to ask is it possible to script the property browser option 'fit to content'!
Thanks,
Glenn
Thanks,
Glenn
Re: Scripting 'fit to content'
I don't think you can do it that simply, in one line, but you can add up the widths of your objects for instance, and put that in a variable, then the height and put that in a variable, then something like (psuedo)~
set the left of this stack to ( the left of your left most object - 5)
set the width of this stack to (varW + 10)
set the height of this stack to (varH + 10)
Something like that, anyway.
set the left of this stack to ( the left of your left most object - 5)
set the width of this stack to (varW + 10)
set the height of this stack to (varH + 10)
Something like that, anyway.

Re: Scripting 'fit to content'
Not sure, but I suspect this is not scripted but something the engine does "on the spot".
Re: Scripting 'fit to content'
All the PI is doing is (I believe):
Code: Select all
set the width of <object> to the formattedWidth of <object>
OR
set the height of <object> to the formattedHeight of <object>
Re: Scripting 'fit to content'
Ooops, sorry, I mixed that with the "exactfit" FULLSCREENMODE.Klaus wrote: Fri Mar 27, 2020 1:04 pm Not sure, but I suspect this is not scripted but something the engine does "on the spot".
Yep, what Mark said!
