Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 276621 - Link widget mnemonic is displayed but does not work
Summary: Link widget mnemonic is displayed but does not work
Status: RESOLVED DUPLICATE of bug 202414
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-17 10:46 EDT by Mark McLaren CLA
Modified: 2009-05-19 10:22 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark McLaren CLA 2009-05-17 10:46:12 EDT
Build ID: 3.5-M6

The link widget displays a mnemonic underscore that doesn't work (see code below).  Please add the mnemonic behaviour.


import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

public class TestMnemonic {

	public static void main(String[] args) {
		Display display = new Display();
		Shell shell = new Shell(display);
		shell.setLayout(new GridLayout(2, false));
		new Link(shell, SWT.NONE).setText("&Name:");
		new Text(shell, SWT.BORDER);
		new Label(shell, SWT.NONE).setText("&Age:");
		new Text(shell, SWT.BORDER);

		shell.pack();
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
		display.dispose();
	}

}
Comment 1 Felipe Heidrich CLA 2009-05-19 10:22:47 EDT

*** This bug has been marked as a duplicate of bug 202414 ***