I'm in the process of upgrading our software from using SmartClient version 11.0 to 12.0 and I have encountered some strange layout problems with 12.
I managed to reduce the problem down to this simple example where I have a canvas with a dynamic height and snapTo B nested inside 2 levels of canvas controls.
In that case, the middle canvas which has a FIXED size of 100 x 100 gets 'stretched' to 100 x 117 as if the most inner canvas is positioned without consideration of it's actual height and so it forces the middle canvas to stretch (because of overflow: "visible").
Here is my sample code:
You will notice that the blue canvas remains at 100x100 while the red one becomes 100x117 although they are created in exactly the same way - the only difference between them is that the red one is nested inside another canvas.
Note: If I run the same code on SC ver. 11.0 both the blue and the red canvases will be correctly sized to 100 x 100 and the inner canvas is positioned correctly inside them.
Would love to hear your thoughts about this.
Thanks in advance
Gil
I managed to reduce the problem down to this simple example where I have a canvas with a dynamic height and snapTo B nested inside 2 levels of canvas controls.
In that case, the middle canvas which has a FIXED size of 100 x 100 gets 'stretched' to 100 x 117 as if the most inner canvas is positioned without consideration of it's actual height and so it forces the middle canvas to stretch (because of overflow: "visible").
Here is my sample code:
You will notice that the blue canvas remains at 100x100 while the red one becomes 100x117 although they are created in exactly the same way - the only difference between them is that the red one is nested inside another canvas.
Code:
isc.Canvas.create({ backgroundColor: "blue", width: 100, height: 100, children: [ isc.Canvas.create({ snapTo: "B", height: 1, overflow: "visible", contents: "Test", textColor: "white", backgroundColor: "black" }) ] }); isc.Canvas.create({ top: 150, children: [ isc.Canvas.create({ backgroundColor: "red", width: 100, height: 100, children: [ isc.Canvas.create({ snapTo: "B", height: 1, overflow: "visible", contents: "Test", textColor: "white", backgroundColor: "gray" }) ] })] });
Would love to hear your thoughts about this.
Thanks in advance
Gil
Comment