joshtynjala oops, you missed my post again, I ill repost:-
group.layout = layout;
layout.requestedColumnCount = 7;
layout.requestedRowCount = 2;
layout.useSquareTiles = false;
layout.horizontalAlign = HorizontalAlign.LEFT;
layout.horizontalGap = 20;
group.width = 1280;
for (var j: int = 0; j < r_Count; j++) {
r_tab = new R_tab(this);
group.addChild(r_tab);
}
addChild(group);
group.validate();
Flox.logInfo("group.height = {0} ", group.height);
if (group.height > 150) {
checkMySize();
}
private function checkMySize(): void {
layout.horizontalGap -= 1;
group.validate();
if (group.height > 150) {
if (layout.horizontalGap > 5)
checkMySize();
else
Flox.logError("Something wrong!");
}
}
The issue is when r_Count is high(no of objects are more), the set horizontal gap is too much and the objects overflow to new row. To check this case, when I use group.height it always returns (2*r_tab.height) because layout.requestedRowCount = 2.
Instead of using layout.horizontalGap, when I use layout.gap, its giving the correct height!
Could you please tell me how to get the actual height?