How can I open a SystemWindow with a certain extent?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I open a SystemWindow with a certain extent?

Rob Withers
I have a subclass of SystemWindow which I am trying to open with a specific
extent.  I have a buildWindow method that adds all my widgetry and I have a
line of code like:

    self extent: 20 @ 50.

When it opens, this extent isn't respected.   How can I do this?

thanks,
Rob


Reply | Threaded
Open this post in threaded view
|

Re: How can I open a SystemWindow with a certain extent?

Jon Hylands
On Mon, 19 Nov 2007 07:58:22 -0800, "Rob Withers" <[hidden email]>
wrote:

> I have a subclass of SystemWindow which I am trying to open with a specific
> extent.  I have a buildWindow method that adds all my widgetry and I have a
> line of code like:
>
>     self extent: 20 @ 50.
>
> When it opens, this extent isn't respected.   How can I do this?

You open it using this method:

#openInWorldExtent:

Note that the extent that is passed in does not include the system window
frame, which is the title bar and sizing handles.

Later,
Jon

--------------------------------------------------------------
   Jon Hylands      [hidden email]      http://www.huv.com/jon

  Project: Micro Raptor (Small Biped Velociraptor Robot)
           http://www.huv.com/blog

Reply | Threaded
Open this post in threaded view
|

RE: How can I open a SystemWindow with a certain extent?

Gary Chambers-4
In reply to this post by Rob Withers
Try something like

SystemWindow new
        minimumExtent: 20@30;
        extent: 20@30;
        openAsIs

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of Rob
> Withers
> Sent: 19 November 2007 3:58 PM
> To: Squeak Dev
> Subject: How can I open a SystemWindow with a certain extent?
>
>
> I have a subclass of SystemWindow which I am trying to open with
> a specific
> extent.  I have a buildWindow method that adds all my widgetry
> and I have a
> line of code like:
>
>     self extent: 20 @ 50.
>
> When it opens, this extent isn't respected.   How can I do this?
>
> thanks,
> Rob
>
>

Reply | Threaded
Open this post in threaded view
|

Re: How can I open a SystemWindow with a certain extent?

Enno Schwass
In reply to this post by Rob Withers
Hi

> I have a subclass of SystemWindow which I am trying to open with a  
> specific extent.  I have a buildWindow method that adds all my  
> widgetry and I have a line of code like:
>    self extent: 20 @ 50.
> When it opens, this extent isn't respected.   How can I do this?
>

You have to do it outside, because openInWorld works different

Try

SystemWindow new openInWorld; extent: 400@400.

instead.

hth
Enno

Reply | Threaded
Open this post in threaded view
|

Re: How can I open a SystemWindow with a certain extent?

Rob Withers
In reply to this post by Jon Hylands
Thanks, Jon.  Works like a champ.

It uses similar methods to those Gary posted, but this is more high-level.

Cheers,
Rob

----- Original Message -----
From: "Jon Hylands" <[hidden email]>
To: "The general-purpose Squeak developers list"
<[hidden email]>
Sent: Monday, November 19, 2007 8:11 AM
Subject: Re: How can I open a SystemWindow with a certain extent?


On Mon, 19 Nov 2007 07:58:22 -0800, "Rob Withers" <[hidden email]>
wrote:

> I have a subclass of SystemWindow which I am trying to open with a
> specific
> extent.  I have a buildWindow method that adds all my widgetry and I have
> a
> line of code like:
>
>     self extent: 20 @ 50.
>
> When it opens, this extent isn't respected.   How can I do this?

You open it using this method:

#openInWorldExtent:

Note that the extent that is passed in does not include the system window
frame, which is the title bar and sizing handles.

Later,
Jon

--------------------------------------------------------------
   Jon Hylands      [hidden email]      http://www.huv.com/jon

  Project: Micro Raptor (Small Biped Velociraptor Robot)
           http://www.huv.com/blog



Reply | Threaded
Open this post in threaded view
|

RE: How can I open a SystemWindow with a certain extent?

Gary Chambers-4
Except that, for the UIEnhancements, things now actually respect the
minimumExtent...

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of Rob
> Withers
> Sent: 19 November 2007 4:45 PM
> To: The general-purpose Squeak developers list
> Subject: Re: How can I open a SystemWindow with a certain extent?
>
>
> Thanks, Jon.  Works like a champ.
>
> It uses similar methods to those Gary posted, but this is more high-level.
>
> Cheers,
> Rob
>
> ----- Original Message -----
> From: "Jon Hylands" <[hidden email]>
> To: "The general-purpose Squeak developers list"
> <[hidden email]>
> Sent: Monday, November 19, 2007 8:11 AM
> Subject: Re: How can I open a SystemWindow with a certain extent?
>
>
> On Mon, 19 Nov 2007 07:58:22 -0800, "Rob Withers" <[hidden email]>
> wrote:
>
> > I have a subclass of SystemWindow which I am trying to open with a
> > specific
> > extent.  I have a buildWindow method that adds all my widgetry
> and I have
> > a
> > line of code like:
> >
> >     self extent: 20 @ 50.
> >
> > When it opens, this extent isn't respected.   How can I do this?
>
> You open it using this method:
>
> #openInWorldExtent:
>
> Note that the extent that is passed in does not include the system window
> frame, which is the title bar and sizing handles.
>
> Later,
> Jon
>
> --------------------------------------------------------------
>    Jon Hylands      [hidden email]      http://www.huv.com/jon
>
>   Project: Micro Raptor (Small Biped Velociraptor Robot)
>            http://www.huv.com/blog
>
>
>