Changing a group visible boundaries by script

Alejandro Tejada capellan2000 at gmail.com
Tue Mar 21 00:55:46 EDT 2017


Hi All,

Many Thanks for sharing your code! :D
This works great to fold and expand a group.

-- Fold a group
on mouseUp
   set the rect of grp 1 to the rect of graphic "NODESTART" of grp 1
   set the hscroll of grp 1 to the hscroll of grp 1 -(the left of grp 1 -
the left of grc "NODESTART" of grp 1)
   set the vscroll of grp 1 to the vscroll of grp 1 -( the top of grp 1 -
the top of grc "NODESTART" of grp 1)
end mouseUp

-- Expand a Group
on mouseUp
   set the rect of grp 1 to the formattedrect of grp 1
end mouseUp

Al



More information about the use-livecode mailing list