QUICK REFERENCE: BUTTON

Everything in Squeak can be a button. We have learned in previous lessons how to use an image like a button. But there are an specific object that is a button. We will talk about it here.

The object Button has another object inside it: String - the label of the button.

The object is instatialized graphically dragging it from the "green window":


position

Drag the Move button of the Halo.


size

Drag the Size button of the Halo.


mouseDown, mouseStillDown, mouseUp, mouseEnter, mouseLeave, mouseEnterDragging, mouseLeaveDragging

We usually glue an script to a button. To define the event that will start the script, click the button "normal" in the Script Editor and select an option.


setLabel:'abcdef'.

The command can be used inside an script or you can select this action in the Menu or Viewer.


sendToBack, bringToFront, embedInto


changeColor

Changes the background color


changeColorOfString

You need to open the Menu of the object String.


changeFontOfString

You need to open the Menu of the object String.


borderColor, borderWidth, borderStyle


shadowColor, shadowOffset


gradientFill, secondColor, radialFill


show


hide

PREVIOUS LESSON NEXT LESSON
T. CONTENTS HOMEPAGE

DISCLAIMER: This material can be translated for any language, and reproduced total or partially by anybody using any type of media. But, please, don't put your name like author. And let me know if it was useful (americo@dmu.com).The use of any code, 3D model or technique published is free and doesn't need to have any reference about this source.The author is not responsible for any damage that the material can cause to your professional or sexual life.