Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Adding scrollbars to forms...(...or disabling the possibility to resize a form window)
Adding scrollbars to forms... [message #1003558] Mon, 21 January 2013 09:10 Go to next message
Urs Beeli is currently offline Urs Beeli
Messages: 325
Registered: October 2012
Location: Bern, Switzerland
Senior Member
Scout (or probably SWT/Swing) are pretty good at adjusting element sizes and positions when resizing form windows as long as resizing means increasing the size of a form.

However, when making a form smaller by dragging on its edge, elements that no longer fit just disappear. This is not acceptable behaviour in our application so I'm looking at ways to solve this issue.

I can think if two methods to use in this situation:

  • add scroll bars to the form, so the user can scroll down to the "hidden" elements on the form
    -> is it possible to have these scrollbars automatically added to the form when needed? If not, is it possible to add them explicitely?
  • lock the form window size, so the user cannot make it too small to fit all elements.
    -> is this possible? If yes, how would I do this?


How are others solving this issue in their applications?
Re: Adding scrollbars to forms... [message #1003875 is a reply to message #1003558] Tue, 22 January 2013 02:11 Go to previous messageGo to next message
Arthur vD is currently offline Arthur vD
Messages: 50
Registered: March 2010
Member
Per default getConfiguredScrollable is false on an AbstractGroupBox. If you set it to true in your outermost GroupBox, the form should show scrollbars if you make it smaller. There are many ways to change the resizing behaviour of GUI elements and I don't find all of them very intuitive. So you probably have to play around a bit to get the desired result. Have fun.
Re: Adding scrollbars to forms... [message #1003904 is a reply to message #1003875] Tue, 22 January 2013 03:02 Go to previous messageGo to next message
Urs Beeli is currently offline Urs Beeli
Messages: 325
Registered: October 2012
Location: Bern, Switzerland
Senior Member
Arthur vD wrote on Tue, 22 January 2013 08:11
Per default getConfiguredScrollable is false on an AbstractGroupBox. If you set it to true in your outermost GroupBox, the form should show scrollbars if you make it smaller.

Ah, thanks. I had been looking for this property on the form and couldn't find it. Setting it on the GroupBox works as I hoped, thank you.

Arthur vD wrote on Tue, 22 January 2013 08:11
There are many ways to change the resizing behaviour of GUI elements and I don't find all of them very intuitive. So you probably have to play around a bit to get the desired result. Have fun.

Any hints on where I might start playing around?
Re: Adding scrollbars to forms... [message #1004046 is a reply to message #1003904] Tue, 22 January 2013 08:50 Go to previous messageGo to next message
Arthur vD is currently offline Arthur vD
Messages: 50
Registered: March 2010
Member
Quote:
Quote:
There are many ways to change the resizing behaviour of GUI elements and I don't find all of them very intuitive. So you probably have to play around a bit to get the desired result. Have fun.

Any hints on where I might start playing around?


Properties like fillHorizontal/Vertical, GridW/H, GridWeightX/Y, GridUseUiWidth/Height and Width/HeightInPixel can be set on every FormField. The end result is not always entirely predictable, at least to me... Very Happy

[Updated on: Tue, 22 January 2013 08:51]

Report message to a moderator

Re: Adding scrollbars to forms... [message #1004451 is a reply to message #1004046] Wed, 23 January 2013 04:09 Go to previous message
Urs Beeli is currently offline Urs Beeli
Messages: 325
Registered: October 2012
Location: Bern, Switzerland
Senior Member
Thanks, I'll play around with those.
Previous Topic:Database autorisation using DataSourceSecurityFilter
Next Topic:MessageBox dimensions
Goto Forum:
  


Current Time: Sun Aug 31 00:43:24 EDT 2014

Powered by FUDForum. Page generated in 0.01768 seconds