[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: View & Toolbar

setChecked should be sufficient.  Make call this method before adding the
action to the toolbarmanager.

Notice that by setting the checked state you are changing the result of
getStyle(), which is used when creating the ToolItem.

"Jan Odvárko" <jan.odvarko@xxxxxxxxxxxxxx> wrote in message
news:b1ld0u$ei4$1@xxxxxxxxxxxxxxxx
> Hi All,
> I have created a custom view (derived fromViewPart class),
> which uses action toolbar (I am using IToolBarManager). Further
> I have added some actions into to toolbar (simply by add
> method) and it works well.
> The question is, how can I visually check the button within
> that toolbar in order to indicate, that the action is active? Just
> to note that the action stands as a switch (on, off).
> I have called the setChecked(true) method on the action object,
> however the button is still not checked. Should I refresh or
> somehow update the toolbar buttons?
>
> thanks
>
> cheers
>
> Honza
>
>