Coding the User Interface: Other Buttons
P | N


Use makeButton:on:for: to create buttons.

addIncrementButtonOn: aCount

| button buttonArea |

button := self makeButton: 'increment'

on: aCount for: #increment.

buttonArea := self constraintFrame: 0 @ 0

corner: 1/3 @ (1/3).

self addView: button in: buttonArea.

addResetButtonOn: aCount

| button buttonArea |

button := self makeButton: 'reset' on: aCount for: #reset.

buttonArea := self constraintFrame: 2/3 @ 0

corner: 1 @ (1/3).

self addView: button in: buttonArea.


Previous | Next


Last modified at 7/8/97; 10:02:32 AM
Other Links of Interest
College of Computing | EduTech Institute | GVU Center
Mark Guzdial | Papers | CS 2390 Spring '97 Home Page | STABLE | MMC-CaMILE