I am trying to use a ProportionalLayout. If I look at ClassBrowserShell
view, and within one of its ContainerViews the aspect for its layout manager is set to 'a ProportionalLayout'. By adding a ShellView to my View hierachy (in the VC) I can then mutate this to a ContainerView, and add the appropriate views to it (drag & drop), and set the layout manager to a proportional layout. But within this ContainerView I do not get the very first aspect I need to set, **arrangement aspect (for example, arrangement=#center) does not show up as it does in the ClassBrowserShell ContainerView). What am I doing wrong or need to do? thanks in advance Gary Overgard |
Gary,
> What am I doing wrong or need to do? I'm not quite sure what you are doing so here's a step-by-step. - Open the VC and select File/New Shell View - Set it's layout manager aspect to #proportional. This controls the layout of any views you add to this shell. - Open up the toolbox and locate "CompositePresenter.Default view". This is an empty container and should be user in preference to the mutate you mention. - Drag/drop two of these onto the Shell. NB. You can drop the first directly onto the shell but, because you have already set the layout manager, it will be expanded to fill the whole view. You will have to do the second drop onto the "ShellView" label in the ViewHierarchy tree, bottom left in the VC. - To make it easier to see set the #hasBorder aspect of both containers to true. - You can see that the two containers are equal in size. Select the first one, change it's #arrangement aspect to 2 and accept (Ctrl-S). The left hand view now occupies 2/3 of the shell and the right hand view 1/3 - Go back to the shell and expand the layoutManager aspect tree, you should see #isVertical set to false. Set this to true and it's two subviews will now be have a horizontal split but the 2:1 ratio will still hold. - Next step. Select the larger container view and set it's layoutManager aspect to BorderLayout. This now sets the layoutManager for anything added to this container view. - From the toolbox drag two "PushButton.Push button" resources onto the larger container. Their #arrangement is set to nil so they just stay the same size. - Select one button and change it's #arrangement aspect to "north". It is fitted across the top of the view and will do so whatever size the shell becomes (normally used for toolbars). - Do the same to the other button but choose "south" (normally used for status bars) - Back to the toolbox and drop a new "CompositePresenter.Default view" between the two buttons. Set it's #arrangement to "Centre". It is now filling the rest of it's parent container - the bits not covered by buttons. - Final step. Drop six "PushButton.Push Buttons" onto this last container view. Now change the container's layout manager aspect to GridLayout. The six buttons will be spread out across the container. Note that the PushButtons are given #arrangement aspects but they cannot be set to anything other than nil. Change the column/row subaspects of the container's layout manager to arrange the six buttons in a different way. I'll leave FramingLayout's to you - but ask if you get stuck. Regards Ian |
Thanks Ian, that explanation/demonstration definitely helped. I also found
that if the top ShellView does not have a LayoutManager, that it causes the problem with the missing 'arrangement' aspect in sub container views Regards, Gary Overgard |
Gary,
> Thanks Ian, that explanation/demonstration definitely helped. I also found > that if the top ShellView does not have a LayoutManager, that it causes the > problem with the missing 'arrangement' aspect in sub container views It should be perfectly valid for a ShellView not to have a layout manager; this is the way you would take control of your own subview resizing. Can you post a code snippet that demonstrates this problem? Best Regards, Andy Bower Dolphin Support http://www.object-arts.com --- Are you trying too hard? http://www.object-arts.com/Relax.htm --- |
In reply to this post by Gary Overgard
"Gary Overgard" <[hidden email]> wrote in message news:<a34c3d$2ev$[hidden email]>...
> Thanks Ian, that explanation/demonstration definitely helped. I also found > that if the top ShellView does not have a LayoutManager, that it causes the > problem with the missing 'arrangement' aspect in sub container views > Regards, > Gary Overgard hehe ... Dolphins are clever ... :-) arrangement might be presented as property of the object, it might even be stored in the object (I can't tell right now), but it only *makes sense*, when there is a layout manager to use the hint given there. so there is no need to display it for subviews of non-managed containers. s. |
In reply to this post by Andy Bower
I presume from Stefans reply that the missing arrangement aspect was my
problem, and not the systems. Otherwise let me know & I will attempt to recreate the problem. --Gary "Andy Bower" <[hidden email]> wrote in message news:a36ucu$13dm7c$[hidden email]... > Gary, > > > Thanks Ian, that explanation/demonstration definitely helped. I also > found > > that if the top ShellView does not have a LayoutManager, that it causes > the > > problem with the missing 'arrangement' aspect in sub container views > > It should be perfectly valid for a ShellView not to have a layout manager; > this is the way you would take control of your own subview resizing. Can > post a code snippet that demonstrates this problem? > > Best Regards, > > Andy Bower > Dolphin Support > http://www.object-arts.com > --- > Are you trying too hard? > http://www.object-arts.com/Relax.htm > --- > > |
Free forum by Nabble | Edit this page |