Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Set focus in properties view
Set focus in properties view [message #335829] Sat, 02 May 2009 18:06 Go to next message
Eclipse UserFriend
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] Sat, 02 May 2009 21:02 Go to previous messageGo to next message
Eclipse UserFriend
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 08:01 Go to previous messageGo to next message
Eclipse UserFriend
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 17:41 Go to previous message
Eclipse UserFriend
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: Tue Mar 11 23:58:11 EDT 2025

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

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

Back to the top