Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Eclipse tabbed property sheet and weird scrollbars
Eclipse tabbed property sheet and weird scrollbars [message #1008124] Sun, 10 February 2013 08:46 Go to next message
Fredrik Attebrant is currently offline Fredrik AttebrantFriend
Messages: 34
Registered: June 2012
Member

Hi,

I've run into a problem with scroll bars appearing in a strange way in my tabbed property section.

The section contains a TreeViewer and if it contains a lot of elements, I get a vertical scroll bar, but not for the viewer but rather in a composite 5 levels up (i.e. supplied by the framework). Also, if the viewer contains an element which has a very wide label, I get two (2!) horizontal scroll bars.

Now, I'm looking for ideas on how to resolve this.

It can all be reproduced using the Hockey League example as follows:

Go a head and clone the repo and check out the org.eclipse.ui.examples.views.properties.tabbed.hockeyleague project from:

git clone git://git.eclipse.org/gitroot/platform/eclipse.platform.ui.git

Before testing, if on a Mac, open System Preferences > General > Set "Show Scroll bars" to "Always".

However, this is best reproduced on Linux or Windows (with their more "chunky" scroll bars)


1. Launch debug session with the Hockey League example
2. Import attached hockey league file "plenty.hockeyleague"
3. Expand and select Team Montreal Lions
4. Use context menu -> Show Properties View
5. Select the "Forwards" tab and not its layout: table at the top, add/delete buttons below
6. Expand and select Team Toronto Storm
7. Note how the table is too tall to be contained within the properties view and the the add/delete buttons are no longer visible
8. Use the vertical scroll bar to scroll down and find the add/delete buttons
9. Note how there is a horizontal scrollbar within the table while the vertical scroll bar is controlling the whole "Forwards" tab
10. Viewing "Forwards" for other teams (with a smaller number of Forwards) looks ok

Now, I'm working with a tabbed property section where I have the same problem and I'm looking for ideas on how to ensure that the scroll bars are located within the table only and not for the whole section.

In this case the vertical scroll bar has a big impact on usability.

All help appreciated!

Thanks,

--Fredrik
Re: Eclipse tabbed property sheet and weird scrollbars [message #1015931 is a reply to message #1008124] Mon, 04 March 2013 09:58 Go to previous message
Fredrik Attebrant is currently offline Fredrik AttebrantFriend
Messages: 34
Registered: June 2012
Member

Got a solution to this, thanks to my collegue, Mattias Bertilsson.
By overriding resizeScrolledComposite() in the class HockeyleaguePropertySheetPage, the scrolling can be contained within the controls of the section.

This will prevent the default implementation in org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.resizeScrolledComposite() to add/remove (unwanted) scrollbars.

public class HockeyleaguePropertySheetPage
	extends TabbedPropertySheetPage {
 ...

        /**
         * Overridden to disable scrollbars and allow sections to layout themselves
         * to fit the actual size of the view. Requires the sections to provide
         * scrolling when needed
         */
        public void resizeScrolledComposite() {
        }
}

[Updated on: Mon, 04 March 2013 10:20]

Report message to a moderator

Previous Topic:Where did the Appearance settings go?
Next Topic:Is Eclipse Juno SR2 build M20130204-1200?
Goto Forum:
  


Current Time: Tue Mar 19 04:43:44 GMT 2024

Powered by FUDForum. Page generated in 0.01527 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top