buttons hiding when the view looses focus [message #639934] |
Thu, 18 November 2010 08:16  |
Eclipse User |
|
|
|
Hi all,
in my application I've got a view that contains a tableviewer that is the one that gets the focus on the view. In my plug.xml file I've got a contribution to the view toolbar like the following:
<command
commandId="hrpm.rcp.commands.EditTableElement"
icon="img/edit.png"
id="hrpm.rcp.gui.view.UserView.edit"
label="Modifica"
style="push"
tooltip="Modifica l'elemento selezionato">
<visibleWhen
checkEnabled="true">
<with
variable="selection">
<iterate
ifEmpty="false"
operator="or">
</iterate>
<and>
<with
variable="activePartId">
<equals
value="hrpm.rcp.gui.view.UserView">
</equals>
</with>
</and>
</with>
</visibleWhen>
</command>
this makes the button visible on the toolbar only when there is a selected row in the view (or better, in the table viewer). Now, if the user gives the focus on another view, even if the row is still selected in the first table viewer, the contribution is no more visible and to make it visible again the user have to select the view to give it the focus. Is there a way to avoid this annoying contribution disappearing when the view looses the focus?
Thanks.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.42530 seconds