resize in browse mode

malte.brill at t-online.de malte.brill at t-online.de
Tue Dec 28 06:51:17 EST 2004


Hi,

I did it again... Posting without propewr testing. <g> 
The previous script only works if the field is empty. The script below
also works with non empty fields.

on mouseMove
  if the optionkey is down and the mouse is down then
    set the lockText of me to true
    set the rect of me to the topleft of me,the mouseloc
    --add width and height check here
  end if
end mouseMove

on mouseRelease
  set the lockText of me to false
end mouseRelease

You might want to check if the field is broader or taller than a
certain threshold (30 Pixels in this case):

on mouseMove
  if the optionkey is down and the mouse is down then
    set the lockText of me to true
    lock screen
    set the rect of me to the topleft of me,the mouseloc
    --width and height check  below
     put the topleft of me into oldTopleft
     if the width of me<30 then 
       set the width of me to 30
     end if
      if the height of me<30 then
         set the height of me to 30
      end if
      set the topleft of me to oldTopleft
      unlock screen 
   end if
end mouseMove

on mouseRelease
  set the lockText of me to false
end mouseRelease

Sorry for posting too fast in my previous mail.

Best,

Malte


More information about the use-livecode mailing list