How to create toolbar?

I have try the code below, but doesn't work

ActionManager manager = ActionManager.getInstance();

ActionToolbar toolbar = manager.createActionToolbar("MyToolBar", new MyActionGroup(), true);

Is that after i craeted the toolbar, i must set to some places? Or my creation got wrong?

2 comments
Comment actions Permalink

Actually i know i must add the toolbar to some where, but where is it?

0
Comment actions Permalink

You need ActionGroup before.
DefaultActionGroup group = new DefaultActionGroup();
group.addChild(action1);
group.addChild(action2);
group.addChild(action3);

After this do:
ActionManager.getInstance().createActionToolbar()
Thanks!

"WinsonChan" <no_mail@jetbrains.com> wrote in message
news:4291170.1066658988119.JavaMail.itn@is.intellij.net...

I have try the code below, but doesn't work

>

ActionManager manager = ActionManager.getInstance();

>

ActionToolbar toolbar = manager.createActionToolbar("MyToolBar", new

MyActionGroup(), true);
>

Is that after i craeted the toolbar, i must set to some places? Or my

creation got wrong?


0

Please sign in to leave a comment.