Page 3 of 3

Re: custom resize group handler

Posted: Fri Jun 01, 2012 9:44 pm
by bn
Hi LoloKiki,

I gave it a try and don't know if that is what you want. Now you can resize complex groups and simple objects with the larg handles. Still alt-click into an object and the resize handles/group appear. For text fields that are editable you have to add a script to the objects that is triggered by pressing the alt-key and moving into the field. MouseEnter is the message that is used. All this because editable fields don't receive mouseUp messages.

Look at the scripts and tell me if it is what you wanted. Some explanation in the stack also.
ResizeGroup&Objects_0.0.5.livecode.zip
(6.14 KiB) Downloaded 332 times
Kind regards
Bernd

Re: custom resize group handler

Posted: Fri Jun 01, 2012 11:54 pm
by shaosean
You can always trap the rawKeyDown and rawKeyUp messages and then set the lockText property of the field based on the optionKey function..

Code: Select all

on rawKeyDown
  set the lockText of field "YOUR_FIELD" to (the optionKey is down)
  pass rawKeyDown
end rawKeyDown

on rawKeyUp
  set the lockText of field "YOUR_FIELD" to (the optionKey is up)
  pass rawKeyUp
end rawKeyUp

Re: custom resize group handler

Posted: Sat Jun 02, 2012 12:19 am
by bn
Hi shaosean,

thanks for the suggestion. Alas on MacOS pressing the option(alt)-Key does not send a rawKeyDown message. So pressing the alt-key and klicking into a field would not temporarily lock the field for it to receive the mouseUp message. Thats why I used the mouseEnter message.
Kind regards
Bernd

Re: custom resize group handler

Posted: Sat Jun 02, 2012 3:14 am
by jacque
If you left-click in an editable field with the command key down (control key on Windows) then you do get a mousedown and mouseup.

Re: custom resize group handler

Posted: Sat Jun 02, 2012 9:15 am
by bn
Hi jaque,
If you left-click in an editable field with the command key down (control key on Windows) then you do get a mousedown and mouseup.
thank you, that is good to know.
Kind regards
Bernd

Re: custom resize group handler

Posted: Sat Aug 04, 2012 10:42 am
by jmburnod
Hi All,
I have uploaded a resizing complex group stack to revonline.
Resizing a group of groups and move it with horizontal constraint

It is here:
http://revonline2.runrev.com/stack/655/ ... MoveGroupH



Best regards

Jean-marc