Prev | Current Page 709 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

core.Layout;
import ui.controls.Button;
import ui.flash9.StageView;
class Main
{
public static function main()
{
var view = new StageView();
var tl = new Button(???Top Left???);
tl.vLayout = tl.hLayout = AnchorStart(40);
view.addChild(tl);
var tr = new Button(???Top Right???);
tr.hLayout = AnchorEnd(40, 100);
tr.vLayout = AnchorStart(40, 100);
view.addChild(tr);
var bl = new Button(???Bottom Left???);
bl.hLayout = AnchorStart(40, 100);
bl.vLayout = AnchorEnd(40, 100);
view.addChild(bl);
var br = new Button(???Bottom Right???);
br.vLayout = br.hLayout = AnchorEnd(40);
view.addChild(br);
var c = new Button(???Center???);
c.vLayout = Center();
c.hLayout = Margins(40);
view.addChild(c);
view.render();
}
}
StackLayout
The StackLayout arranges the controls in a pile. The pile can be oriented vertically or horizontally as
specified in the constructor argument. The class inherits from the MultiContainer class. The class has a
variable spacing that specifies the distance between two adjacent controls in the pile.


Pages:
697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721