Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 242959 Details for
Bug 421836
[GTK3] Some composite now have background
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
A snippet to reproduce it (using Section)
TestBug421836_.java (text/x-java), 1.60 KB, created by
Mickael Istria
on 2014-05-12 06:34:18 EDT
(
hide
)
Description:
A snippet to reproduce it (using Section)
Filename:
MIME Type:
Creator:
Mickael Istria
Created:
2014-05-12 06:34:18 EDT
Size:
1.60 KB
patch
obsolete
> >import org.eclipse.swt.SWT; >import org.eclipse.swt.graphics.Color; >import org.eclipse.swt.graphics.RGB; >import org.eclipse.swt.layout.RowLayout; >import org.eclipse.swt.widgets.Composite; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.ui.forms.widgets.FormToolkit; >import org.eclipse.ui.forms.widgets.Section; > >public class TestBug421836_ { > > public static void main(String[] args) { > final Display display = new Display(); > > Color cyan = new Color(display, new RGB(0, 255, 255)); > Color pink = new Color(display, new RGB(255, 0, 255)); > > Shell shell = new Shell(display, SWT.CLOSE); > shell.setLayout(new RowLayout(SWT.VERTICAL)); > > FormToolkit tk = new FormToolkit(display); > Section section = new Section(shell, Section.DESCRIPTION | Section.TITLE_BAR); > section.setBackground(pink); > section.setTitleBarBackground(cyan); > section.setText("looooooooooooooooooooooong Section title, My background is CYAN"); > section.setDescription("Section description with PINK background"); > Composite composite = tk.createComposite(section, SWT.NONE); > composite.setLayout(new RowLayout(SWT.VERTICAL)); > tk.createLabel(composite, "a label in a section"); > tk.createLabel(composite, "parent bg-mode=" + composite.getBackgroundMode()); > tk.createLabel(composite, "section bg-mode=" + section.getBackgroundMode()); > section.setClient(composite); > > shell.pack(); > shell.open(); > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) { > // If no more entries in event queue > display.sleep(); > } > } > cyan.dispose(); > pink.dispose(); > display.dispose(); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 421836
:
237492
|
240040
|
242948
|
242958
| 242959