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

Problem with sizing CanvasItem when using setCellHeight

$
0
0
SmartClient Version: v9.0p_2013-11-05/LGPL Development Only (built 2013-11-05)

Browser: IE9 (I don't think the problem is browser-specific)

I am trying to use setCellHeight on a CanvasItem and then get the content to fill it vertically. I've tried two variations, neither of which seems to be behaving properly. Sample code is attached. You can create an onModuleLoad that instantiates the object and then draws it.

In the first case, I set the height of the canvas to 100%. Since I set the cell height to 25px I am expecting that setting the canvas in the cell to 100% to fill the cell (minus the padding). Instead, it makes it 100% of the entire form height (not the cell height) and it does not account for the form cell padding thus making the height 4px too tall and causing a vertical scrollbar.

In the second case, I set the height of the canvas to *. In this case it seem to properly limit it to the cell height which is better, but it leaves double the padding space on top and bottom (so I get 4px of padding on the top and bottom instead of 2px each).

Attached Files
File Type: java CanvasItemSetCellHeight.java (2.3 KB)

Viewing all articles
Browse latest Browse all 4756

Trending Articles