• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Hug your destiny! And hug this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic