Bug 363821 - [Forms] FormDialog dialog area always have scrollbars visible
Summary: [Forms] FormDialog dialog area always have scrollbars visible
Status: ASSIGNED
Alias: None
Product: RAP
Classification: RT
Component: Workbench (show other bugs)
Version: 1.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 08:37 EST by Setya Nugdjaja CLA
Modified: 2012-03-05 05:55 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Setya Nugdjaja CLA 2011-11-15 08:37:30 EST
Hi,

Reproduce with the following snippet:

class DemoDialog extends FormDialog
{
	public DemoDialog(Shell shell) 
	{
		super(shell);
  	super.setShellStyle(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | getDefaultOrientation());
	}

	@Override
	protected void createFormContent(IManagedForm managedForm) 
	{
		managedForm.getForm().getBody().setLayout(GridLayoutFactory.fillDefaults().create());
		
    Composite tableContainer = managedForm.getToolkit().createComposite(managedForm.getForm().getBody());
    tableContainer.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
    
  	TableViewer tableViewer = new TableViewer(managedForm.getToolkit().createTable(tableContainer, SWT.NONE));
    tableViewer.getTable().setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
    
    TableColumnLayout layout = new TableColumnLayout();
    layout.setColumnData(new TableViewerColumn(tableViewer, SWT.NONE).getColumn(), new ColumnWeightData(100, ColumnWeightData.MINIMUM_WIDTH, false));
    tableContainer.setLayout(layout);
	}
}

...
	@Override
	public void createPartControl(final Composite parent)
	{
	  parent.setLayout(GridLayoutFactory.fillDefaults().extendedMargins(5, 5, 5, 5).create());
		
	  Composite container = toolkit.createComposite(parent);
	  container.setLayout(GridLayoutFactory.fillDefaults().create());
	  container.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
	  
	  Button button = toolkit.createButton(container, "Click me to show dialog", SWT.PUSH);
	  button.addSelectionListener
	  (
			new SelectionAdapter()
			{
				@Override
				public void widgetSelected(SelectionEvent e)
				{
					DemoDialog dialog = new DemoDialog(parent.getDisplay().getActiveShell());
					dialog.open();
				}
			}
		);
	}
...

Regards,

Setya
Comment 1 Ivan Furnadjiev CLA 2011-11-22 09:41:07 EST
To be precise, these are not the scrollbars of the TableViewer, but scrollbars of ScrolledForm used in FormDialog#createDialogArea.
Comment 2 Setya Nugdjaja CLA 2012-03-04 08:38:12 EST
Hi,

Any update on this bug ?

Also did you notice that the Editor's title is missing when the dialog is open ?


Thanks & Regards,

Setya
Comment 3 Ralf Sternberg CLA 2012-03-05 05:55:00 EST
Hi Setya, I'm sorry to say but it's currently not on our priorities list. Help (preferably in the form of quality patches) is welcome anyway.