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 232287 Details for
Bug 404202
Combo posts modify event instead of just sending it (was: Find/Replace Dialog: First find does not enable Replace button)
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.
Test Snippet
ComboBug.java (text/plain), 1.92 KB, created by
Dani Megert
on 2013-06-12 09:57:30 EDT
(
hide
)
Description:
Test Snippet
Filename:
MIME Type:
Creator:
Dani Megert
Created:
2013-06-12 09:57:30 EDT
Size:
1.92 KB
patch
obsolete
>/******************************************************************************* > * Copyright (c) 2013 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at > * http://www.eclipse.org/legal/epl-v10.html > * > * Contributors: > * IBM Corporation - initial API and implementation > *******************************************************************************/ >package org.eclipse.swt.snippets; > >import org.eclipse.swt.SWT; >import org.eclipse.swt.events.ModifyEvent; >import org.eclipse.swt.events.ModifyListener; >import org.eclipse.swt.events.TraverseEvent; >import org.eclipse.swt.events.TraverseListener; >import org.eclipse.swt.graphics.Rectangle; >import org.eclipse.swt.widgets.Combo; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; > >public class ComboBug { > > public static void main(String[] args) { > > final ModifyListener l= new ModifyListener() { > @Override > public void modifyText(ModifyEvent e) { > System.out.println("BUG!"); //$NON-NLS-1$ > } > }; > > Display display= new Display(); > Shell shell= new Shell(display); > > final Combo combo= new Combo(shell, SWT.NONE); > combo.setItems(new String[] { "1", "2", "3" }); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ > combo.setText(combo.getItem(0)); > > combo.addTraverseListener(new TraverseListener() { > @Override > public void keyTraversed(TraverseEvent e) { > if (e.detail == SWT.TRAVERSE_RETURN) { > combo.removeModifyListener(l); > combo.removeAll(); > combo.addModifyListener(l); > } > } > }); > > Rectangle clientArea= shell.getClientArea(); > combo.setBounds(clientArea.x, clientArea.y, 100, 100); > combo.addModifyListener(l); > shell.pack(); > shell.open(); > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) > display.sleep(); > } > 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 404202
:
229955
|
229956
| 232287