Open elzone opened 7 years ago
Does using and "absolute" container help? (<absolute />
)
I tried Box, Absolute. all the same
here is my class code:
package app.components.modifyComponents.contentPart; import haxe.ui.toolkit.containers.Absolute; import haxe.ui.toolkit.layout.Layout; import haxe.ui.toolkit.layout.BoxLayout; import app.components.activities.FreeFlowActivity; import models.Constants; import haxe.ui.toolkit.containers.Box; class ModifyViewContentPart extends Box {
private var contentBox: Box;
public function new( )
{
super();
autoSize = false;
percentWidth = 100;
percentHeight = 100;
}
override public function initialize()
{
super.initialize();
contentBox = new Box();
addChild( contentBox );
}
public function createPanel( data: Dynamic, sX: Float, sY: Float ): Void
{
switch( data.name )
{
case Constants.FREE_FLOW:
var panel: FreeFlowActivity = new FreeFlowActivity();
contentBox.addChild( panel );
panel.x = sX - 384 / 2;
panel.y = sY - 256 / 2;
panel.setButtonsVBoxPosition();
}
}
}
Hi Ian.
Could you help me with this problem?
Could you zip up your code? Or a minimal example that i could work with? Will mean i can try and work it out much faster, with less guess work.
Cheers, Ian
will prepare example today
Hello. I'm creating the app with drag n drop functionality and when i addChild to a Box container more then one all preveous components in this Box move to point 0, 0 before adding: https://yadi.sk/i/nygzlTBJwe4EQ
after adding new components: https://yadi.sk/i/MGlORqt_we4NB
please help me to solve this issue