Shrink Wrapped Window

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

Shrink Wrapped Window

Sean P. DeNigris
Administrator
I want a Window that shrinks to fit its contents, like a PluggableDialogWindow, but that has a title bar and buttons, like a Standard Window. Any ideas?

Thanks.
Sean
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Shrink Wrapped Window

wernerk
Hi,
perhaps you could use a DialogWindow and just change initializeLabelArea
to the standardwindow method. or if you want to use a standardwindow,
you could put everything into a panel, put that panel into the
standardwindow and use the panels minExtent, which does its layout
thing, to set the extent of the standardwindow.
werner


Reply | Threaded
Open this post in threaded view
|

Re: Shrink Wrapped Window

Sean P. DeNigris
Administrator
Werner Kassens wrote
you could put everything into a panel, put that panel into the
standardwindow and use the panels minExtent, which does its layout
thing, to set the extent of the standardwindow.
Thanks for the suggestion. I've been looking for #minExtent for about a year!!! I wrote up a little test that did just what you said:

guts := SimpleObjectMessagesMorph on: Year.
wSize := guts minExtent + 25.
StandardWindow new
        addMorph: guts fullFrame: (LayoutFrame
        fractions: (0@0 corner: 1@1));
        openInWorld;
        extent: guts minExtent.

Sean
Cheers,
Sean