Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

bug report: DynamicForm colWidths formula incorrect

$
0
0
Consider the following code:

Code:

isc.DynamicForm.create({
  width: 700,
  numCols: 4,
  colWidths: [25,50,25,"*"],
  fields: [
      { title:"B", type: "binary" },
      { title:"T", type: "text", width: "100%"}
  ]
});

When I run this, I expect to see that my form will be 700 pixels wide. What I see (in the Developer Console/Watch) instead is that the form is taking up 854 pixels. The width of 50 is below the minimum width for the binary field, so the overall width of the form is expanding to make up the difference. That is, the minimum width can be calculated here as 854-700+50=204.

Furthermore, it appears that this minimum width changes if the form is connected to a dataSource. This means the minimum width is unpredictable.

It looks like the "*" width is calculated based directly on colWidths, but I suggest that it be calculated using max(colWidth,minWidth) instead.

I realize this problem is unavoidable if width is set too small to fit all the minimum widths, but at least some formatting issues (and mine in particular) can be avoided...

I'm using v90p_2014-01-24_Pro on Safari 6.1.1.

Viewing all articles
Browse latest Browse all 4756

Trending Articles