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


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