Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Set focus in properties view
Set focus in properties view [message #335829] Sat, 02 May 2009 22:06 Go to next message
Michael is currently offline MichaelFriend
Messages: 23
Registered: July 2009
Junior Member
Hi,

I display the Properties View with
PlatformUI.getWorkbench().getActiveWorkbenchWindow().
getActivePage().showView("org.eclipse.ui.views.PropertySheet ");

How can I achieve that the focus (cursor) is on a special attribute, e.g.
the name attribute?

Thanks,
Michaek
Re: Set focus in properties view [message #335830 is a reply to message #335829] Sun, 03 May 2009 01:02 Go to previous messageGo to next message
Ben Vitale is currently offline Ben VitaleFriend
Messages: 247
Registered: July 2009
Senior Member
I'm not sure there is API to achieve this. I poked around on
PropertySheetPage and didn't see anything. Ditto on the underlying
PropertySheetViewer. Feel free to have a look yourself though.

You may want to check out the tabbed properties view, which is more
flexible.

http://www.eclipse.org/articles/Article-Tabbed-Properties/ta bbed_properties_view.html

Cheers
Ben

Michael wrote:
> Hi,
>
> I display the Properties View with
> PlatformUI.getWorkbench().getActiveWorkbenchWindow().
> getActivePage().showView("org.eclipse.ui.views.PropertySheet ");
>
> How can I achieve that the focus (cursor) is on a special attribute,
> e.g. the name attribute?
>
> Thanks,
> Michaek
>
>
Re: Set focus in properties view [message #335831 is a reply to message #335830] Sun, 03 May 2009 12:01 Go to previous messageGo to next message
Michael is currently offline MichaelFriend
Messages: 23
Registered: July 2009
Junior Member
Hi Ben,

thanks for your answer. It's already a tabbed property view since it's
about the properties of a GMF diagram.
Re: Set focus in properties view [message #335834 is a reply to message #335831] Sun, 03 May 2009 21:41 Go to previous message
Ben Vitale is currently offline Ben VitaleFriend
Messages: 247
Registered: July 2009
Senior Member
Probably the place you'll have sufficient information to find that field
is in the ISection implementation. You can extend refresh() to set focus
where you want it.

I guess it depends on when you want that field to gain focus. Only the
first time the view is opened? In that scenario you'd probably have to
make your logic a little smarter..

Hope that helps.

-Ben


Michael wrote:
> Hi Ben,
>
> thanks for your answer. It's already a tabbed property view since it's
> about the properties of a GMF diagram.
>
Previous Topic:debugging menu contributions
Next Topic:Creating IFile outside Eclipse
Goto Forum:
  


Current Time: Thu Dec 26 20:49:53 GMT 2024

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

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

Back to the top