Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » Section in Form Page is not getting Expanded
Section in Form Page is not getting Expanded [message #758664] Thu, 24 November 2011 07:25 Go to next message
Vinod Kannur is currently offline Vinod KannurFriend
Messages: 7
Registered: October 2011
Junior Member

I have a created the Form view page using Eclipse Plug-gin with a view.I am trying to run a Form View Page, but Sections are not expanded on my first display.
I have set the property of Section as Expanded but its not getting reflected. If I again click on the section, it will display the contents.

Please find the code snippet for the Form View Page.

public class View extends ViewPart {
	private final FormToolkit formToolkit = new FormToolkit(Display.getDefault());
	private Text txtEemv;
public View() {
	public static final String ID = "example2.view";
	class ViewContentProvider implements IStructuredContentProvider {
		public void inputChanged(Viewer v, Object oldInput, Object newInput) {

		public void dispose() {

		public Object[] getElements(Object parent) {
			if (parent instanceof Object[]) {
				return (Object[]) parent;
	        return new Object[0];

	class ViewLabelProvider extends LabelProvider implements
			ITableLabelProvider {
		public String getColumnText(Object obj, int index) {
			return getText(obj);

		public getColumnImage(Object obj, int index) {
			return getImage(obj);

		public getImage(Object obj) {
			return PlatformUI.getWorkbench().getSharedImages().getImage(

	public void createPartControl(Composite parent) {
		TabFolder tabFolder = new TabFolder(parent, SWT.BOTTOM);
final ScrolledForm scrldfrmNewScrolledform = formToolkit.createScrolledForm(tabFolder);
Section sctnCatalogEntry = formToolkit.createSection(scrldfrmNewScrolledform.getBody(),Section.EXPANDED| Section.TWISTIE| Section.TITLE_BAR);
		sctnCatalogEntry.setBounds(10, 276, 365, 124);
		sctnCatalogEntry.setText("Catalog Entry");
		sctnCatalogEntry.setToolTipText("Catalog Information");
Composite composite_2 = new Composite(sctnCatalogEntry, SWT.Expand);
		org.eclipse.swt.widgets.Label lblNewLabel_3 = new org.eclipse.swt.widgets.Label(composite_2, SWT.NONE);
		lblNewLabel_3.setBounds(7, 10, 84, 15);
		formToolkit.adapt(lblNewLabel_3, true, true);
		lblNewLabel_3.setText("Item Title :");
		txtContractToCash_1 = new Text(composite_2, SWT.BORDER);
		txtContractToCash_1.setBounds(102, 7, 241, 21);
		txtContractToCash_1.setText("Contract to Cash");
		formToolkit.adapt(txtContractToCash_1, true, true);
public void setFocus() {
	public void dispose() {

Can you please let me know what could be reason and how can I render when I run for the first time?


Thanks in Advance!
Re: Section in Form Page is not getting Expanded [message #759447 is a reply to message #758664] Mon, 28 November 2011 17:21 Go to previous message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
Your question is not about Sapphire. You will need to post it on another forum. Maybe try the main Eclipse Platform forum...

Alternatively, you may want to know that developers who use Sapphire do not need to struggle with SWT/JFace/Forms widgets. You can learn more about Sapphire in this intro article...


- Konstantin

Previous Topic:Sapphire 0.4 RC1
Next Topic:Running a sapphire application in a simple java main method
Goto Forum:

Current Time: Sun Nov 27 16:53:07 GMT 2022

Powered by FUDForum. Page generated in 0.02228 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top