|
Re: Focus in CCombo box [message #444133 is a reply to message #444126] |
Thu, 07 October 2004 12:47 |
Veronika Irvine Messages: 1272 Registered: July 2009 |
Senior Member |
|
|
The following works for me. What platform are you running on and what style
do you use to create the CCombo?
public static void main (String [] args) {
Display display = new Display ();
Shell shell = new Shell (display);
shell.setLayout(new FillLayout());
Button b = new Button(shell, SWT.PUSH);
b.setText("Button 1");
b = new Button(shell, SWT.PUSH);
b.setText("Button 2");
CCombo combo = new CCombo(shell, SWT.NONE);
for (int i = 0; i < 10; i++) {
combo.add("abc "+i);
}
b = new Button(shell, SWT.PUSH);
b.setText("Button 3");
shell.pack();
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
"Mike Tabb" <mtabb@us.ibm.com> wrote in message
news:ck1okg$pat$1@eclipse.org...
> When I tab through a composite and tab into a CCombo box , the cursor
> never
> appears in the text , and therefore I can never leave. This poses an
> accessibility issue for my application. To solve this I register a focus
> listener on the box , and call setFocus() when the listener receives a
> focus
> event , therefore forcing the text to get control. But this creates
> another
> problem , because now it takes two clicks on the down arrow to show the
> drop-down list. Has anyone seen this before?
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03661 seconds