[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] how to add the menu bar to a CoolItem

hello,
I'd like to create a application with GUI like outlook,
but the diffculty is I could not add a menu to a CoolItem which
is just what I want it be.
I've tried to create a ToolBar with ToolItem created as followed
ToolItem item = new ToolItem(intance of ToolBar,SWT.FLAT);
item.setText("&File");
.
.
.
then I add the toolbar to a composite,and use method as follow
composite.pack();
Point size = composite.getSize();
coolitem.setControl(composite);
coolitem.setSize(coolitem.computeSize(size.x,size.y));

ok,so far,the gui looks like what I want it be,but the menu's
behavior is not as common application.

what shall I do.
thanks for any help.