[Q][morphic] Collapsing menus. Was: how to hide submorphs
Ned Konz
ned at bike-nomad.com
Tue Apr 30 20:47:31 UTC 2002
On Tuesday 30 April 2002 01:09 pm, Martin Drautzburg wrote:
> I wrote:
> > I'd recommend not having visible submorphs outside your
> > fullBounds. Actually, I'd recommend not having submorphs at all
> > outside your fullBounds.
>
> So how would you collapse a menu ?
You mean like in, say Windows? Sorry, I wasn't thinking of menu bars
in windows, but of independent floating menus.
The easiest way is to realize that you have two different pieces:
there's the menu button itself that pops up/down the menu, and the
menu itself. They shouldn't be part of the same Morph.
Changing the size of the morph is a no-no in most window layouts.
So instead, you realize that the menu is a different thing, and is
actually a separate Morph owned by the world. And its
morphicLayerNumber is low enough to be on top of whatever it was
raised for.
Your menu button then just shows or hides the actual menu, in the
appropriate position.
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|