Bug 284844 - [Layout] The GridLayout is not shown correctly.
Summary: [Layout] The GridLayout is not shown correctly.
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact: Carolyn MacLeod CLA
URL:
Whiteboard: stalebug
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2009-07-28 06:58 EDT by Chen Chao CLA
Modified: 2020-01-10 07:42 EST (History)
2 users (show)

See Also:


Attachments
a simple example snapshot (8.61 KB, image/png)
2009-07-28 07:00 EDT, Chen Chao CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chen Chao CLA 2009-07-28 06:58:51 EDT
Please look the attchment snapshot.

Expected: Text1 grabs all of the space.
Actually: Text1 doesn't grab the space. 

Code:

public class TestGridLayout
{

	public static void main( String[] args )
	{
		Display display = new Display( );
		Shell shell = new Shell( display );
		shell.setSize( 200, 200 );
		shell.setText( "Test layout" );

		GridLayout layout = new GridLayout( );
		layout.numColumns = 3;
		shell.setLayout( layout );

		Text text = new Text( shell, SWT.BORDER );
		text.setText( "Text1" );
		GridData gd = new GridData( GridData.FILL_HORIZONTAL );
		gd.horizontalSpan = 2;
		text.setLayoutData( gd );

		Button button = new Button( shell, SWT.PUSH );
		GridData gd3 = new GridData( );
		gd3.horizontalAlignment = SWT.END;
		button.setText( "..." );
		button.setLayoutData( gd3 );

		Text text1 = new Text( shell, SWT.BORDER );
		text1.setText( "Text2" );
		GridData gd1 = new GridData( GridData.FILL_HORIZONTAL );
		text1.setLayoutData( gd1 );

		Button button1 = new Button( shell, SWT.PUSH );
		GridData gd2 = new GridData( );
		gd2.horizontalSpan = 2;
		button1.setText( "..............." );
		button1.setLayoutData( gd2 );

		shell.layout( );

		shell.open( );
		while ( !shell.isDisposed( ) )
		{
			if ( !display.readAndDispatch( ) )
				display.sleep( );
		}
		display.dispose( );
	}

}
Comment 1 Chen Chao CLA 2009-07-28 07:00:04 EDT
Created attachment 142752 [details]
a simple example snapshot
Comment 2 Leo Ufimtsev CLA 2017-08-03 12:33:40 EDT
This is a one-off bulk update. (The last one in the triage migration).

Moving bugs from swt-triaged@eclipse to platform-swt-inbox@eclipse.org and adding "triaged" keyword as per new triage process:
https://wiki.eclipse.org/SWT/Devel/Triage

See Bug 518478 for details.

Tag for notification/mail filters:
@TriageBulkUpdate
Comment 3 Eclipse Genie CLA 2020-01-10 07:42:41 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.