Friday, July 23, 2010

How to create Section with toolbar ?

Setting Text to Section

Section = formToolKit.createSection(composite, ExpandableComposite.TITLE_BAR ExpandableComposite.TWISTIE ExpandableComposite.EXPANDED);

Section.setText("Main Contact Section");
FormData data = new FormData();
Section.setLayoutData(data);


Setting Tool Bar to Section


ToolBar bar = new ToolBar(Section, SWT.FLAT SWT.HORIZONTAL);
ToolItem item = new ToolItem(bar, SWT.PUSH);
item.setText("Ur Item Name");
item.addSelectionListener("Impl Your Listener");
Section.setTextClient(bar);




Regard's
Karthikeyan

1 comments:

Madhu said...

Thanks for the blog. Informative.