Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » FormLayout: prevent Text-fields from resizing horizontally
FormLayout: prevent Text-fields from resizing horizontally [message #460608] Thu, 01 September 2005 10:30 Go to next message
arne anka is currently offline arne ankaFriend
Messages: 133
Registered: July 2009
Senior Member
hi,
resizing a window containing a Group with Text-fields arranged by a
FormLayout causes the Text-fileds to change their sizes accordingly.
whilst resizing horizontally is ok, resizing vertically is rather ugly --
i get big Text-fields with relatively small text inside.
how do i prevent the vertical resizing of the Text-fields and do rather
resize the gaps between?

Group myGroup=new Group(myComposite, SWT.NONE);

FormLayout form=new FormLayout();
form.marginBottom=10;
form.marginHeight=10;
form.marginLeft=10;
form.marginRight=10;
form.marginTop=10;
form.marginWidth=10;

Text myText=new Text(myGroup, SWT.BORDER);

FormData fd=new FormData();
fd.top=new FormAttachment(0,0);
fd.bottom=new FormAttachment(15);
fd.right=new FormAttachment(10);
fd.left=new FormAttachment(0);

myText.setLayoutData(fd);


regards
Re: FormLayout: prevent Text-fields from resizing _vertically_ [message #460610 is a reply to message #460608] Thu, 01 September 2005 10:39 Go to previous messageGo to next message
arne anka is currently offline arne ankaFriend
Messages: 133
Registered: July 2009
Senior Member
vertically, of course (although it should be the same mechanism?)
Re: FormLayout: prevent Text-fields from resizing _vertically_ [message #460623 is a reply to message #460610] Thu, 01 September 2005 18:18 Go to previous message
Eclipse UserFriend
Originally posted by: ddana78ar.yahoo.com.ar

you don't have to set the bottom property to the FormData. This way, it will not take a reference when you resize the group.
Previous Topic:Why TableTree widget is deprecated in Eclipse 3.1?
Next Topic:TreeTable in Swing?
Goto Forum:
  


Current Time: Thu Apr 25 08:53:05 GMT 2024

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

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

Back to the top