CTabFolder using GridLayout [message #714383] |
Wed, 10 August 2011 13:11 |
Missing name Mising name Messages: 6 Registered: August 2011 Location: India |
Junior Member |
|
|
Hi All,
How can I add single composite say CTabFolder on ScrolledForm using GridLayout.
I do not want to add any other Composite on ScrolledForm.
FillLayout is working fine. But do not want to use FillLayout.
Code is |:-
Display display = new Display();
Shell parent = new Shell( display, SWT.RESIZE );
ScrolledForm form = new ScrolledForm( parent, SWT.H_SCROLL );
FormToolkit formToolkit = new FormToolkit( parent.getDisplay() );
form.setSize( 100, 100 );
form.setBackground( formToolkit.getColors().getBackground() );
form.setExpandHorizontal( true );
form.setExpandVertical( true );
final GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 1;
form.getBody().setLayout( gridLayout );
CTabFolder tabFolder = new CTabFolder( form.getBody(), SWT.BORDER );
Composite composite = new Composite( tabFolder, SWT.NONE );
CTabItem item = new CTabItem( tabFolder, SWT.NONE );
item.setText( "Tab 1" );
item.setControl( composite );
item = new CTabItem( tabFolder, SWT.NONE );
item.setText( "Tab 2" );
item = new CTabItem( tabFolder, SWT.NONE );
item.setText( "Tab 3" );
item = new CTabItem( tabFolder, SWT.NONE );
item.setText( "Tab 4" );
tabFolder.setMinimizeVisible( true );
tabFolder.setMaximizeVisible( true );
parent.open();
When i am using ScrolledForm with CtabFolder using GridLayout,Chevron functionality is not shown on the Form. Tab window get displayed till the end of the Tab.But when i use fillLayout it is shown properly.
Please provide some reference on this topic.
Thanks
[Updated on: Wed, 10 August 2011 13:14] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04072 seconds