Horizontal layout with fixed width [message #1038923] |
Thu, 11 April 2013 10:09  |
Eclipse User |
|
|
|
Hello everybody,
I have a requirement that asks me to display four property in a row.
The four property are MinBoundKind, MinBound, MaxBound, MaxBoundKind. All together, they define a range. MinBoundKind and MaxBoundKind are just "included" or "excluded", with labels "[" and "]".
The user wants me to display the range with like this

I can do it with a splitform, but I don't want the "[" and "]" combos to resize when I resize my editor, as it would use excessive screen real estate for a single sign, or make the sign unreadable without any real space gain.
After a quick look at the SplitFormPart class, splitform uses a swt sashform, and sashform columns can't have min/max widths.
In the non sapphire version of the tool I'm refactoring, I've used a simple gridlayout with grabExcessHorizontalSpace property to true or false.
Do you think that I can meet this requirement with the current versions of Sapphire ? If not, do you have advises about how I could add the functionality ? Should I extend SapphirePartContainer ?
Thank you all
Etienne
Attachment: bounds.png
(Size: 2.41KB, Downloaded 622 times)
|
|
|
Re: Horizontal layout with fixed width [message #1039018 is a reply to message #1038923] |
Thu, 11 April 2013 12:29  |
Eclipse User |
|
|
|
There is no existing facility in Sapphire to have an equivalent of a split form, but with fixed width columns. My recommendation would be to see if you can figure out how to patch the existing SplitFormPart class to accomplish this. SWT sash form may not have direct means to acomplish this, but there may still be ways to do this with various layout tricks and/or resize listeners. If you are successful in your experimentation, we can incorporate the patch into the next 0.6.x release (it's minor enough of an enhancement).
- Konstantin
|
|
|
Powered by
FUDForum. Page generated in 0.03140 seconds