Skip to main content



      Home
Home » Eclipse Projects » JFace » Changing the focus button in a wizard page or launch tab
Changing the focus button in a wizard page or launch tab [message #16664] Thu, 25 June 2009 14:26 Go to next message
Eclipse UserFriend
I have a set of controls that I want to use in both a wizard and a launch
configuration tab. Here is my basic problem: I have a simple text box that
the user can enter data into. When they press "enter" I want that data to
go into a table. However, in launch tabs and windows, the "Run" button, or
the "Next" button always has focus, so pressing "Enter" will either start
the launch or go to the next page--definitely not what I want. Is there a
way that I can change the focus from the default button to my own "add"
button when the user selects the text box? I tried using a focus listener
on the text box, but that will just force focus away from the text box so
the user can't enter text. Any ideas? This should be a simple thing to do,
but I can't figure it out.

Del
Re: Changing the focus button in a wizard page or launch tab [message #16682 is a reply to message #16664] Thu, 25 June 2009 14:53 Go to previous message
Eclipse UserFriend
Never mind, figured it out: use Shell.setDefaultButton(). It's just been a
while since I had to do it.
Previous Topic:How to Use JFace TreeViewer
Next Topic:wrong position of cursor when editing a cell in a table
Goto Forum:
  


Current Time: Mon Jun 02 16:11:11 EDT 2025

Powered by FUDForum. Page generated in 0.02451 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top