TIP: A Collapsable Tool Palette

Michael Kristensen michael-kristensen at dsa-net.dk
Wed Nov 9 06:15:33 EST 2011


Hi there

If you have finished adding objects to your stack it can be nice to have a smaller Tool Palette with only the RUN - EDIT button visible.

You can have that in this way:

Go to the preferences of Revolution/Livecode and turn this on:

General: Command-Option or Control-Alt edits script.

and 

General: In Revolution UI windows.


Now hold Command-Option or Control-Alt down over the Tool Palette card.

The script of the Tool Palette card appear.

It has no mouseUp handler, so you can add this:

on mouseUp
   if the mouseV < 5 then
      if the height of this stack is 459 then
         set the height of this stack to 33
      else
         set the height of this stack to 459
      end if
   end if
end mouseUp

Now if you click just under the window bar the window will toggle between full and collapsed.


NOTE: The height of the toolpalette may vary according to if the draw/paint tool is toggled on. Go check it before. In my case they are on.

In any case the ToolPalette will spring to its full when you choose it from the menu.

Michael



More information about the use-livecode mailing list