resize in browse mode

Ken Ray kray at sonsothunder.com
Sun Dec 26 17:45:10 EST 2004


On 12/26/04 6:59 AM, "Bob Hartley" <rev at armbase.com> wrote:

> Hi All.
> 
> I think it is called browse mode. Here is what I want do do.
> I have a field in a stack that I want to resize (not is edit mode but in
> use mode).
> I want the end user to be able to resize it by dragging the corner of the
> field (say bottom right corner).
> 
>   In the documentation there is a command to alter the size of something
> but this is a defined size. I want the user to be able to create and
> arbitrary size of their own choosing but I cannot see the command.
> 
> this will be called y pressing the alt or other key.
> I was think ing of something like this
> 
> on mouseDown
>     if the altKey is down then
>       resize me
>       end if
> end mouseDown

Happy Christmas, Bob!

Try this:

on mouseStillDown
  if the altKey is down then
    put the rect of me into tRect
    put the mouseH into item 3 of tRect
    put the mouseV into item 4 of tRect
    set the rect of me to tRect
  end if
end mouseStillDown

This is kind of crude (i.e. it doesn't take into account the different in
offset from the bottom-right of the field and the location of the mouse),
but you get the idea.


Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list