Scale to fit

David Burgun dburgun at dsl.pipex.com
Mon Oct 10 18:26:18 EDT 2005


I dont think you can do it with an Icon, but you can do it using an 
image object, you can do something like this:

set the filename of image "x" to theFullPathNameOfFile

This will load the image and scale it to fit the rectangle of the image.

To rescale, just set a new rect as in:

put 100,100,300,400 into myRect
set the rect of image "X" to myRect

If you enable geometry on the image object,  it will rescale as the 
window gets bigger/smaller.

Hope this helps
All the Best
Dave


>Hello
>
>I have an image on a card and would like to scale it to fit in a button
>dynamically.
>
>In other words as the button gets bigger the icon should until it reaches
>its actual size.
>
>I can handle the button getting bigger, but I have no idea how to accomplish
>making the icon scale.
>
>Anybody have any examples?
>
>Thanks
>
>Todd
>
>
>
>
>
>--
>
>Todd Geist
>______________________________________
>g e i s t   i n t e r a c t i v e
>
>
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your 
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list