Community
Participate
Working Groups
Build ID: M20080911-1700 Steps To Reproduce: 1. Build a preference page that dynamically adds controls/UI based on a popup or something (so the UI in the page grows or shrinks) 2. Change options in the popup so page size changes Result: the scroll bars only appear based on the content when the page was first created, other items get clipped. PreferenceDialog should be informed when a Page's layout() method is called and call scrolled.setMinSize() based on the new currentPage.computeSize() (Just like it does in showPage() initially). More information: This is a problem for us in Flex Builder, we have UI that is getting clipped.
It seems that JDT does this for their preference page: Java -> Compiler -> Errors/Warnings. The scroll bars appear in this dialog when a section is expaded. This is done by: 1) JavaTemplatePreferencePage overrides createContents() and wraps contents into a ScrolledPageContent (derivative of ScrolledComposite). 2) The code that processes expasion of dialog sections finds this ScrolledPageContent in its chain of parents and calls reflow(true) on it forcing it to recalculate the page size. This shows a possible way to achieve this today, but, of course, in a very awkward way. It seems that implementing this functionality on PreferenceDialog / PreferencePage will require API addition, something along the lines of PreferencePage#updateLayout() and PreferenceDialog#updateLayout(). The updateLayout() method then will be called by the preference pages when they add/remove controls. As a note, the JDT code in SharedScrolledComposite#reflow() has some peculiar pieces dealing with updating page sizes and scroll increments.
Feels like you (George) should either use a workaround similar to JDT's, or even better, contribute a patch along the lines of what Oleg suggested. http://wiki.eclipse.org/Platform_UI/How_to_Contribute