Message-ID: <323587DC.15E3@mail.amsinc.com>
Date: Tue, 10 Sep 1996 08:23:08 -0700
From: Tom Hawker <thawker@mail.amsinc.com>
Organization: AMS, Incorporated
X-Mailer: Mozilla 2.02 (Win16; I)
MIME-Version: 1.0
Newsgroups: comp.lang.smalltalk
Subject: Re: Notice of changed windows size
References: <3234D3F3.2CED@sap-ag.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: thawker.amsinc.com
Lines: 22
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!nntp.sei.cmu.edu!news.cis.ohio-state.edu!math.ohio-state.edu!uwm.edu!news-peer.gsl.net!news.gsl.net!www.nntp.primenet.com!nntp.primenet.com!newsfeed.internetmci.com!in2.uu.net!dns.amsinc.com!

S.Pfeil wrote:
> 
> Hello smalltalkers
> 
> How can I find out that my window size has changed ???
> I couldn't find any special methode like noticeOfWindowsClose or any
> other window event.

In PPDT VisualWorks, you need to make yourself aware that a resize
event will occur.  You do this by adding #resize to the list of
window events you send:

	builder window sendWindowEvents: #(... #resize).

You then need to implement windowEvent:from: to respond to resize.
A typical implementation is:

	windowEvent: anEvent from: anAppWindow

	super windowEvent: anEvent from: anAppWindow.
	((anEvent isKindOf: Event) and: [anEvent key == #resize])
		ifTrue: ["Do the resizing."].

You need to test for the event being an event and not an association
because resize events get posted twice for some reason, once as an
event and the other as an assocation, #resize -> Rectangle.

Tom Hawker
thawker@mail.amsinc.com
