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

See:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/sn
ippits/snippet67.html

"colcen" <colcen@xxxxxxxx> wrote in message
news:b91rb9$3ha$1@xxxxxxxxxxxxxxxx
> 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.
>
>