Saturday 23 March 2019

Changing window shape

If you want a custom window shape, like this:

instead of this:

You have to import the image backgroud, this image must have transparent parst like a GIF or a PNG.
Then you have to set the windowshape of the stack to the imported image, using the property inspector. Finished.
Unfortunately you have no more the icons to iconify or close the window, ho you have to add these buttons:


Now add the following code in the close button:
on MouseUp
   quit
end MouseUp

and this code in the iconify button:
on mouseUp
   set the iconic of this stack to true
end mouseUp

Now add this code in the stack to move it:
on mouseStillDown   
   set the loc of this stack to globalloc(the mouseLoc)
end mouseStillDown
   

No comments:

Post a Comment