Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » GridLayout: bug in method calculateGridDimensions?
GridLayout: bug in method calculateGridDimensions? [message #447952] Wed, 22 December 2004 08:31 Go to next message
cloudor Mising name is currently offline cloudor Mising nameFriend
Messages: 34
Registered: July 2009
Member
Hi,

When computing the size, the grid layout always doubles the horizontal
spacing when its makeColumnsEqualWidth attribute is true. I tracked the
code and found this is caused by line 266: maxWidth +=horizontalSpacing;

Here is the context, line 260-270:

if (makeColumnsEqualWidth) {
maxWidth = 0;
// Find the largest column size that is necessary and ...
for (int i = 0; i < numColumns; i++) {
maxWidth = Math.max(maxWidth, pixelColumnWidths[i]);
}
maxWidth += horizontalSpacing;
for (int i = 0; i < numColumns; i++) {
pixelColumnWidths[i] = maxWidth;
}
}
Re: GridLayout: bug in method calculateGridDimensions? [message #447957 is a reply to message #447952] Wed, 22 December 2004 13:06 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
GridLayout was rewritten in 3.1 to fix a number of bugs. Please retry with
Eclipse 3.1 M4.

See:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=70854

"Cloudor Pu" <cloudor@126.com> wrote in message
news:cqbbcd$pcb$1@www.eclipse.org...
> Hi,
>
> When computing the size, the grid layout always doubles the horizontal
> spacing when its makeColumnsEqualWidth attribute is true. I tracked the
> code and found this is caused by line 266: maxWidth +=horizontalSpacing;
>
> Here is the context, line 260-270:
>
> if (makeColumnsEqualWidth) {
> maxWidth = 0;
> // Find the largest column size that is necessary and ...
> for (int i = 0; i < numColumns; i++) {
> maxWidth = Math.max(maxWidth, pixelColumnWidths[i]);
> }
> maxWidth += horizontalSpacing;
> for (int i = 0; i < numColumns; i++) {
> pixelColumnWidths[i] = maxWidth;
> }
> }
>
Previous Topic:Remove "input methods" item in popup menu
Next Topic:About GridLayout Source
Goto Forum:
  


Current Time: Wed Oct 28 03:56:41 GMT 2020

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

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

Back to the top