Question
Extend the use case of includeInLayout
Let's focus on the case of VBox. When component.includeInLayout=false, the component is placed at the position of the previously placed component in the VBox. Hence, even though component.includeInLayout==false, the position of the component is changed. However, I sometimes want to place e.g. a Button at an arbitrary position within a VBox. But this is not possible because the position gets overridden by the VBox.
So why is the position of the component.includeInLayout==false just not touched? For example, change line 272 of mx.containers.utilityClasses.BoxLayout in 3.0.2.2095 from
for (i = 0; i < n; i++)
{
obj = IUIComponent(target.getChildAt(i));
left = (w - obj.width) * horizontalAlign + paddingLeft;
obj.move(Math.floor(left), Math.floor(top));
if (obj.includeInLayout)
top += obj.height + gap;
}
to something like
for (i = 0; i < n; i++)
{
obj = IUIComponent(target.getChildAt(i));
if (obj.includeInLayout)
{
left = (w - obj.width) * horizontalAlign + paddingLeft;
obj.move(Math.floor(left), Math.floor(top));
top += obj.height + gap;
}
}
Marc
So why is the position of the component.includeInLayout==false just not touched? For example, change line 272 of mx.containers.utilityClasses.BoxLayout in 3.0.2.2095 from
for (i = 0; i < n; i++)
{
obj = IUIComponent(target.getChildAt(i));
left = (w - obj.width) * horizontalAlign + paddingLeft;
obj.move(Math.floor(left), Math.floor(top));
if (obj.includeInLayout)
top += obj.height + gap;
}
to something like
for (i = 0; i < n; i++)
{
obj = IUIComponent(target.getChildAt(i));
if (obj.includeInLayout)
{
left = (w - obj.width) * horizontalAlign + paddingLeft;
obj.move(Math.floor(left), Math.floor(top));
top += obj.height + gap;
}
}
Marc
