
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
