how does one set height of contributed part (view) [message #495445] |
Wed, 04 November 2009 17:15  |
Eclipse User |
|
|
|
I'm trying a layout where I have a control area (unfortunately can't use a toolbar) that I'm representing with a View. I'd like that control area to butt up against a "main" area below it, where the control area is to be exactly 100 pixels high. I've created my Application.xmi with a
<children policy="VerticalComposite">
<children xsi:type="application:MContributedPart"... (for the view)
</children>
<children policy="HorizontalComposite">
<children xsi:type="application:MSashForm" policy="horizontalSash">
...
</children>
</children>
</children>
The question: this automatically takes over 50% of the height with the contributed view, instead of 100 pixels. The view code internally has stuff saying that the maximum size should be 100 pixels high. I also tried setting 'height' as a CSS property for the view, but that did nothing either.
Does anybody have an idea how I can force the height of this contributed view to be fixed to 100 pixels? I *really* don't want to have to put in a SashForm and provide a weight, since that's a percentage rather than a fixed value and will let the view grow vertically.
Thanks,
Dave
[Updated on: Wed, 04 November 2009 17:16] by Moderator
|
|
|
|
|
|
Re: how does one set height of contributed part (view) [message #564432 is a reply to message #495456] |
Wed, 04 November 2009 19:08  |
Eclipse User |
|
|
|
Tom, the GridLayout sounds like a good idea. Better yet (I'm certainly no expert, not being part of the e4 team) if possible might be an attribute to indicate the type of layout to use with the Composite. Of course, there would then need to be some sort of support to indicate how to configure the individual children (like the widthHint and heightHint you mentioned in the case of the grid layout.)
If anybody else has any ideas (both for me to get through this in the short term or for a longer-term solution) I'd love to hear them.
Thanks!
Dave
|
|
|
|
Powered by
FUDForum. Page generated in 0.26041 seconds