Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 297466 - [Forms] Section description overlaps title
Summary: [Forms] Section description overlaps title
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: Workbench (show other bugs)
Version: 1.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.3 M5   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 299914
Blocks:
  Show dependency tree
 
Reported: 2009-12-10 06:25 EST by Setya Nugdjaja CLA
Modified: 2010-02-17 08:09 EST (History)
0 users

See Also:


Attachments
Screenshot of Section with overlapped title (2.72 KB, image/png)
2009-12-10 06:25 EST, Setya Nugdjaja CLA
no flags Details
Screenshot of Section with client added (2.95 KB, image/png)
2009-12-10 06:34 EST, Setya Nugdjaja CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Setya Nugdjaja CLA 2009-12-10 06:25:42 EST
Created attachment 154219 [details]
Screenshot of Section with overlapped title

The following snippet shows Section which Title text is overlapped by its
Description text as shown by the attached screenshot:

...
parent.setLayout(new TableWrapLayout());

Section section = toolkit.createSection(parent,Section.TITLE_BAR |
Section.DESCRIPTION);
section.setText("This is title");
section.setDescription("This is description below title");

TableWrapData tableWrapData = new TableWrapData(TableWrapData.FILL_GRAB);
tableWrapData.colspan = 1;
tableWrapData.grabHorizontal = true;

section.setLayoutData(tableWrapData);
...

Regards,

Setya
Comment 1 Setya Nugdjaja CLA 2009-12-10 06:33:44 EST
Adding client to the Section seems to be the workaround (2nd screenshot), but why the rectangle ?

...
parent.setLayout(new TableWrapLayout());

Section section = toolkit.createSection(parent,Section.TITLE_BAR |
Section.DESCRIPTION);
section.setText("This is title");
section.setDescription("This is description below title");

TableWrapData tableWrapData = new TableWrapData(TableWrapData.FILL_GRAB);
tableWrapData.colspan = 1;
tableWrapData.grabHorizontal = true;

section.setLayoutData(tableWrapData);

Composite container = toolkit.createComposite(section,SWT.NONE);
container.setLayout(GridLayoutFactory.fillDefaults().create());
section.setClient(container);
...


Setya
Comment 2 Setya Nugdjaja CLA 2009-12-10 06:34:46 EST
Created attachment 154220 [details]
Screenshot of Section with client added
Comment 3 Ivan Furnadjiev CLA 2009-12-10 06:36:00 EST
Setya, I think that this is a duplicate of bug 263025 that has been fixed in 1.3M3. Are you using 1.2 release? Can you confirm this?
Comment 4 Setya Nugdjaja CLA 2009-12-10 06:53:12 EST
Hi Ivan,

Sorry, but I'm using 1.3M3 to reproduce this bug.


Setya
Comment 5 Ivan Furnadjiev CLA 2009-12-10 16:07:55 EST
Setya, I've tested your snippet in RCP and the description text is not visible if there is no client set. What is the use case of section without client control? As you mention in comment #2, setting client control fixes the problem.
Comment 6 Setya Nugdjaja CLA 2009-12-10 22:37:31 EST
Hi,

In our case the Section client is displayed under certain conditions, so if those conditions are not met, we'll use the Section description to tell user about why the content client is not displayed.

I guess Section description is part of client, if that's so we have no choice but always adding the Section client.

In the meantime we have found workaround to avoid rectangle by using label as control description.

Regards,

Setya
Comment 7 Ivan Furnadjiev CLA 2010-01-15 09:59:10 EST
Description control is visible only if the section is expanded and the client control is set.
Comment 8 Ivan Furnadjiev CLA 2010-01-18 05:30:19 EST
Remove the workaround due to generic fix for bug 299914.
Comment 9 Setya Nugdjaja CLA 2010-02-17 07:20:43 EST
Hi,

I tested this bug under M4 and it seems that this bug still there. I mean using the same snippet as above the rectangle line is still visible in the description control.
Comment 10 Ivan Furnadjiev CLA 2010-02-17 07:34:37 EST
Setya, the "default" description control in Section is a Text widget. Do you have any custom ( CSS ) styling of a Text widget?
Comment 11 Setya Nugdjaja CLA 2010-02-17 07:42:59 EST
(In reply to comment #10)
> Setya, the "default" description control in Section is a Text widget. Do you
> have any custom ( CSS ) styling of a Text widget?

Yes, I do. 

So the option is remove the CSS styling or use custom widget ?
Comment 12 Ivan Furnadjiev CLA 2010-02-17 08:09:41 EST
... or set a Label as a description control.