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 84693 Details for
Bug 21619
Programmatically dropdown a combo
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Simple test for Combo.setListVisible()
ShowComboListTest.java (text/plain), 1.50 KB, created by
Scott Kovatch
on 2007-12-06 20:06:49 EST
(
hide
)
Description:
Simple test for Combo.setListVisible()
Filename:
MIME Type:
Creator:
Scott Kovatch
Created:
2007-12-06 20:06:49 EST
Size:
1.50 KB
patch
obsolete
> import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public class ShowComboListTest { public static void main(String[] args) { Display display = new Display(); Shell s = new Shell(display); GridLayout shellLayout = new GridLayout(); shellLayout.numColumns = 1; s.setLayout(shellLayout); s.setBounds(100, 100, 200, 150); final Combo c = new Combo(s, SWT.DROP_DOWN|SWT.READ_ONLY); GridData fd = new GridData(); c.add("option 1"); c.add("option 2"); c.setLayoutData(fd); Button clickMe = new Button(s, SWT.PUSH | SWT.CENTER); clickMe.setText("open popup"); clickMe.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { c.setListVisible(true); } }); Button clickMeToo = new Button(s, SWT.PUSH | SWT.CENTER); clickMeToo.setText("close popup"); clickMeToo.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { c.setListVisible(false); } }); s.open(); while (!s.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } } }
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 21619
:
84594
| 84693 |
84694