Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Spacing in RowLayout problem

I tried to download the latest SWT version with the size:
 
-rw-rw-r--    1 cuong    ...     723766 Mar 27 22:01 swt.jar
-rw-rw-r--    1 cuong    ...     27783 Mar 27 22:01 swt-pi.jar
It's the same as the current I have
It' that correct packages I need to download to fix the "Spacing in RowLayout problem" ?
----- Original Message -----
Sent: Monday, April 28, 2003 5:21 PM
Subject: Re: [platform-swt-dev] Spacing in RowLayout problem


This was just fixed.  Please try it out in HEAD.  If still broken, please enter a bug report.  Thanks.



"Cuong MacroNT" <cuongnt@xxxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

04/28/2003 04:11 PM
Please respond to platform-swt-dev

       
        To:        <platform-swt-dev@xxxxxxxxxxx>
        cc:        
        Subject:        [platform-swt-dev] Spacing in RowLayout problem



Hi,
the RowLayout class always add one more extra spacing size.
Here is the demostration:
Assumes that, I create 2 buttons in horizontal box:

...
   Composite comp = new Composite(parent, SWT.NONE);
   RowLayout layout = new RowLayout();
   layout.marginTop = 0;
   layout.marginBottom = 0;
   layout.marginLeft = 0;
   layout.marginRight = 0;
   layout.wrap = false;
   layout.type = SWT.HORIZONTAL;
   comp.setLayout(layout);
// In that case the default spacing is 3
   Button button1 = new Button(comp, SWT.PUSH);
   button1.setText("Button 1");
   Button button2 = new Button(comp, SWT.PUSH);
   button2.setText("Button 2");
// Assume the width of button1 = 30, button2 = 32, so the width
// of Composite comp should be = 30 + 3 + 32 = 65
// But the actual width (using getSize()) is 68 meaning: 30 + 3 + 32 + 3

Any idea to get rid of that extra spacing ?


_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev



Back to the top