Windows in Squeak

Philippe de Rochambeau pr1 at club-internet.fr
Mon Feb 2 14:09:25 UTC 1998


Mark Guzdial wrote:
> 
> At 11:58 AM 2/2/98, Philippe de Rochambeau wrote:
> >How do you create a simple application window containing a button, in Squeak?
> >I could not find a Window class in Squeak and the View class's information is
> >quite cryptic to the uninitiated.
> 
> Here's the simplest one window and one button that I know of.  (But I still
> haven't figured out how to make the window open up smaller.)
> 
>         | topView aButton |
>         topView := StandardSystemView new
>         label: 'Silly Window'.
>         aButton := Button newOff onAction: [Smalltalk beep].
>         topView addSubView: (SwitchView new
>                 label: 'Beep' asParagraph;
>                 insideColor: Color gray;
>                 model: aButton; borderWidth: 1) viewport: (0 at 0 corner: 1 at 1).
>          topView controller open.
> 
> --------------------------
> Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280
> (404) 894-5618 : Fax (404) 894-0673 : guzdial at cc.gatech.edu
> http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.html


Many thanks Mark. The window seems to have the same size as the Workspace. I
wonder why.

Philippe de Rochambeau





More information about the Squeak-dev mailing list