Make Window Not-Sizable

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

Make Window Not-Sizable

peaslee
I have a subclass of ComposableModel that I would like to keep from being resized by the user. Is this possible?
Reply | Threaded
Open this post in threaded view
|

Re: Make Window Not-Sizable

Stephan Eggermont-3
On 18/04/16 01:11, peaslee wrote:
> I have a subclass of ComposableModel that I would like to keep from being
> resized by the user. Is this possible?

Sure.

w := (MethodBrowser new
        methods: Object methods;
        openWithSpec) window.
w beUnresizeable;
        removeCollapseBox;
        removeExpandBox;
        removeMenuBox

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: Make Window Not-Sizable

peaslee
Stephan Eggermont wrote
On 18/04/16 01:11, peaslee wrote:
> I have a subclass of ComposableModel that I would like to keep from being
> resized by the user. Is this possible?

Sure.

w := (MethodBrowser new
        methods: Object methods;
        openWithSpec) window.
w beUnresizeable;
        removeCollapseBox;
        removeExpandBox;
        removeMenuBox

Stephan
The ComposableModel class does not appear to have these methods. I can get a SystemWindow to work, but then I cannot see how to get the widgets in.
Reply | Threaded
Open this post in threaded view
|

Re: Make Window Not-Sizable

Stephan Eggermont-3
On 20/04/16 03:33, peaslee wrote:

> Stephan Eggermont wrote
>> On 18/04/16 01:11, peaslee wrote:
>>> I have a subclass of ComposableModel that I would like to keep from being
>>> resized by the user. Is this possible?
>>
>> Sure.
>>
>> w := (MethodBrowser new
>> methods: Object methods;
>> openWithSpec) window.
>> w beUnresizeable;
>> removeCollapseBox;
>> removeExpandBox;
>> removeMenuBox
>>
>> Stephan
>
> The ComposableModel class does not appear to have these methods. I can get a
> SystemWindow to work, but then I cannot see how to get the widgets in.

Sure it does. MethodBrowser subclasses ComposableModel.
Here is another way

  (MethodBrowser new
        methods: Object methods;
        whenBuiltDo: [ :ann |
                ann model window widget widget
                        beUnresizeable;
                        removeCollapseBox;
                        removeExpandBox;
                        removeMenuBox ];
        openWithSpec).

So, lots of moving parts. When the widget has been build, an
announcement is sent containing the model and the widget. model window
is there a spec WindowModel, which itself has a MorphicWindowAdapter as
its widget. The MorphicWindowAdapter then has the SpecWindow
(subsubclass of SystemWindow) as its widget.
   Next to the number of moving parts, another issue is knowing when in
the creation process the announcements are sent, and in which order the
widgets are build.

Stephan

Stephan