Shrink Wrapped Window

classic Classic list List threaded Threaded
3 messages Options
Sean P. DeNigris Sean P. DeNigris
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Shrink Wrapped Window

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
Werner Kassens Werner Kassens
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Shrink Wrapped Window

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


Sean P. DeNigris Sean P. DeNigris
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Shrink Wrapped Window

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
Loading...