MenuBar is not displayed check image. [message #52076] |
Tue, 08 April 2003 23:15 |
Eclipse User |
|
|
|
Originally posted by: narushima_to.ybb.ne.jp
MenuBar is not displayed check image.
(e,g, "Window" -> "Lock the Toolbar" is to display check image.)
But, I can't create to display check button in menu.
how to create checkbox button in menu bar?
--
public class XXXAction extends Action {
public void run() {
setChecked(!isChecked);
}
}
class XXXContributor extends BasicTextEditorActionContributor {
MenuManager manager;
public XXXContributor() {
super();
manager = new MenuManager("XXX");
manager.add(new XXXAction() );
}
public void contributeToMenu(IMenuManager menuManager) {
super.contributeToMenu(menuManager);
menuManager.insertAfter(IWorkbenchActionConstants.M_EDIT, manager);
}
}
--
but don't display check image.
--
Narushima Hironori mailto:narushima_to@ybb.ne.jp
|
|
|
Re: MenuBar is not displayed check image. [message #52387 is a reply to message #52076] |
Fri, 11 April 2003 17:39 |
Eclipse User |
|
|
|
Originally posted by: dwhitema.us.ibm.com
ask on eclipse.tools newsgroup
"Narushima Hironori" <narushima_to@ybb.ne.jp> wrote in message
news:b6vkqk$bsp$1@rogue.oti.com...
> MenuBar is not displayed check image.
> (e,g, "Window" -> "Lock the Toolbar" is to display check image.)
>
> But, I can't create to display check button in menu.
>
>
> how to create checkbox button in menu bar?
>
> --
>
> public class XXXAction extends Action {
> public void run() {
> setChecked(!isChecked);
> }
> }
>
> class XXXContributor extends BasicTextEditorActionContributor {
>
> MenuManager manager;
>
> public XXXContributor() {
> super();
> manager = new MenuManager("XXX");
> manager.add(new XXXAction() );
> }
>
> public void contributeToMenu(IMenuManager menuManager) {
> super.contributeToMenu(menuManager);
> menuManager.insertAfter(IWorkbenchActionConstants.M_EDIT, manager);
> }
> }
>
> --
>
> but don't display check image.
>
> --
> Narushima Hironori mailto:narushima_to@ybb.ne.jp
|
|
|
Re: MenuBar is not displayed check image. [message #65338 is a reply to message #52076] |
Sun, 22 August 2004 04:47 |
Eclipse User |
|
|
|
Originally posted by: krystox.gmail.com
The only thing you need to do is override the constructor of Action like
this:
public MyAction(){
super("Name", IAction.AS_CHECK_BOX);
}
Then you can use isChecked() to get the status.
Narushima Hironori wrote:
> MenuBar is not displayed check image.
> (e,g, "Window" -> "Lock the Toolbar" is to display check image.)
> But, I can't create to display check button in menu.
> how to create checkbox button in menu bar?
> --
> public class XXXAction extends Action {
> public void run() {
> setChecked(!isChecked);
> }
> }
> class XXXContributor extends BasicTextEditorActionContributor {
> MenuManager manager;
> public XXXContributor() {
> super();
> manager = new MenuManager("XXX");
> manager.add(new XXXAction() );
> }
> public void contributeToMenu(IMenuManager menuManager) {
> super.contributeToMenu(menuManager);
> menuManager.insertAfter(IWorkbenchActionConstants.M_EDIT, manager);
> }
> }
> --
> but don't display check image.
|
|
|
Re: MenuBar is not displayed check image. [message #65359 is a reply to message #52076] |
Sun, 22 August 2004 04:50 |
Eclipse User |
|
|
|
Originally posted by: krystox.gmail.com
The only thing you need to do is override the constructor of Action like
this:
public MyAction(){
super("Name", IAction.AS_CHECK_BOX);
}
Then you can use isChecked() to get the status.
Narushima Hironori wrote:
> MenuBar is not displayed check image.
> (e,g, "Window" -> "Lock the Toolbar" is to display check image.)
> But, I can't create to display check button in menu.
> how to create checkbox button in menu bar?
> --
> public class XXXAction extends Action {
> public void run() {
> setChecked(!isChecked);
> }
> }
> class XXXContributor extends BasicTextEditorActionContributor {
> MenuManager manager;
> public XXXContributor() {
> super();
> manager = new MenuManager("XXX");
> manager.add(new XXXAction() );
> }
> public void contributeToMenu(IMenuManager menuManager) {
> super.contributeToMenu(menuManager);
> menuManager.insertAfter(IWorkbenchActionConstants.M_EDIT, manager);
> }
> }
> --
> but don't display check image.
|
|
|
|
Re: MenuBar is not displayed check image. [message #597955 is a reply to message #52076] |
Sun, 22 August 2004 04:47 |
Eclipse User |
|
|
|
Originally posted by: krystox.gmail.com
The only thing you need to do is override the constructor of Action like
this:
public MyAction(){
super("Name", IAction.AS_CHECK_BOX);
}
Then you can use isChecked() to get the status.
Narushima Hironori wrote:
> MenuBar is not displayed check image.
> (e,g, "Window" -> "Lock the Toolbar" is to display check image.)
> But, I can't create to display check button in menu.
> how to create checkbox button in menu bar?
> --
> public class XXXAction extends Action {
> public void run() {
> setChecked(!isChecked);
> }
> }
> class XXXContributor extends BasicTextEditorActionContributor {
> MenuManager manager;
> public XXXContributor() {
> super();
> manager = new MenuManager("XXX");
> manager.add(new XXXAction() );
> }
> public void contributeToMenu(IMenuManager menuManager) {
> super.contributeToMenu(menuManager);
> menuManager.insertAfter(IWorkbenchActionConstants.M_EDIT, manager);
> }
> }
> --
> but don't display check image.
|
|
|
Re: MenuBar is not displayed check image. [message #597961 is a reply to message #52076] |
Sun, 22 August 2004 04:50 |
Eclipse User |
|
|
|
Originally posted by: krystox.gmail.com
The only thing you need to do is override the constructor of Action like
this:
public MyAction(){
super("Name", IAction.AS_CHECK_BOX);
}
Then you can use isChecked() to get the status.
Narushima Hironori wrote:
> MenuBar is not displayed check image.
> (e,g, "Window" -> "Lock the Toolbar" is to display check image.)
> But, I can't create to display check button in menu.
> how to create checkbox button in menu bar?
> --
> public class XXXAction extends Action {
> public void run() {
> setChecked(!isChecked);
> }
> }
> class XXXContributor extends BasicTextEditorActionContributor {
> MenuManager manager;
> public XXXContributor() {
> super();
> manager = new MenuManager("XXX");
> manager.add(new XXXAction() );
> }
> public void contributeToMenu(IMenuManager menuManager) {
> super.contributeToMenu(menuManager);
> menuManager.insertAfter(IWorkbenchActionConstants.M_EDIT, manager);
> }
> }
> --
> but don't display check image.
|
|
|
Powered by
FUDForum. Page generated in 0.04187 seconds