Constraining window dimensions proportionally while resizing

Scott Rossi scott at tactilemedia.com
Tue Sep 23 12:50:36 EDT 2014


Hi Devin:

One way to do this is to use a dedicated object for the resizer and to
calculate the new dimensions before resizing the stack.

Execute this in your message box:
go url "http://www.tactilemedia.com/download/constrained.livecode"

This demonstrates one way to do a 4 x 3 ratio stack.  I'm not sure if it's
possible to get the window refresh to completely sync with the location of
the resizer, but maybe this will get you close.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 9/23/14 8:25 AM, "Devin Asay" <devin_asay at byu.edu> wrote:

>Hi all,
>
>I just posted this question on stackoverflow. But I thought I¹d ask it
>here where I think I¹ll get some great answers, and hopefully a good
>answer can get posted back to stackoverflow to make the answer more
>widely accessible to web searches.
>
>In a LiveCode project I want the end user to be able to resize a window,
>but I want the window proportions -- the ratio of the width to the height
>-- to remain the same during the resize operation. I have tried various
>approaches, but none was satisfactory, often giving erratic performance.
>What is the best way to resize a stack window and constrain it
>proportionally?
>
>I feel like I may be missing something really obvious. It wouldn¹t be the
>first time. 
>
>Thanks,
>
>Devin
>
>
>Devin Asay
>Office of Digital Humanities
>Brigham Young University
>
>
>_______________________________________________
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode






More information about the use-livecode mailing list