[Q] Detecting Display sizes, etc..

Eddie Cottongim cottonsqueak at earthlink.net
Mon Mar 24 18:33:13 UTC 2003


You can find out Squeak's current window size with
   Display extent

I don't know if you can query the OS for current resolution and stuff like
that. But if not, you could always momentarily go fullscreen and check the
window size.

Usually you would try to use layouts and resizing to avoid dealing with
detecting these things directly. I'm not sure how to do it if your morph is
at the top level. Maybe you can override  #ownerChanged to match your morph
to the world size.

Eddie

----- Original Message -----
From: "Brian Brown" <rbb at techgame.net>
To: "The general-purpose Squeak developers list"
<squeak-dev at lists.squeakfoundation.org>
Sent: Monday, March 24, 2003 1:07 PM
Subject: [Q] Detecting Display sizes, etc..


> Greetings!
>
> Given the scenario of distributing an application by giving someone a
> platform appropriate VM, an image file and a changes file, is there a way
to
> detect the resolution of the hardware the VM is running on and resize the
> window appropriately?
>
> I want to use this information to dynamically populate the World with
widgets
> that I create, but need to know how many will fit in the given size. I'm
> using a table layout inside a rectangle morph now, but I'm currently
> hardcoding the size of the RectangleMorph and would want to determine that
> size at runtime.
>
> Alternatively, could I just add my objects to the World paste-up morph by
> having a TableLayout be embedded in the PasteUpMorph?
>
> Is this making any sense?
>
> thanks!
>
> Brian
>
>
> P.S. Can I automatically "Escape Browser" upon startup?
>
>
>




More information about the Squeak-dev mailing list