It's not a secret anymore!*
The moose likes Swing / AWT / SWT and the fly likes unable to setFocus in SWT fields in eclipse plugin..plz help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "unable to setFocus in SWT fields in eclipse plugin..plz help" Watch "unable to setFocus in SWT fields in eclipse plugin..plz help" New topic
Author

unable to setFocus in SWT fields in eclipse plugin..plz help

Nandan DP
Greenhorn

Joined: Nov 14, 2004
Posts: 1
Hi i have created a Eclipse plug-in containing a form-fields based editor
(i.e, a custom editor for my xml made up of comboboxes & textfiedls).

The screen has few mandatory fields,
on save i check for mandatory fields and pop up appropritate error message,
After this i need to set the focus on appropritate field.

I have used .setFocus() method for setting focus on combo box, it returns false,
i debugged through the source code of swt, i found out the reason behind this, field.isEnabled() returns false ,hence not able to setFocus on it.

I tried field.setEnabled(true), also parent.setEnabled(true) before setting focus, nothing works,
any body who knows this solution,
please help me

2)Also keyboard shortcuts like Ctrl+C, Ctrl+V, does not work in these fields
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: unable to setFocus in SWT fields in eclipse plugin..plz help
 
Similar Threads
retain textbox focus
javascript setfocus
Detect AltGr key?
Problem setting focus for a newly added child element in TreeViewer
Struts2 Datetime Picker focus is not set using javascript