Prev | Current Page 710 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


In Figure 13 - 4 some controls are rendered before in a vertical StackLayout and then in a horizontal one.
import ui.core.Layout;
import ui.containers.StackLayout;
import ui.controls.Button;
import ui.flash9.StageView;
class Main
{
public static function main()
{
var view = new StageView();
// change the following to Horizontal to see the other effect
var stack = new StackLayout(Vertical);
view.addChild(stack);
var first = new Button(???First???);
first.hLayout = first.vLayout = Measures(20, 100, 20);
Chapter 13: Replacing the Need for an IDE
379
stack.addChild(first);
var second = new Button(???Second???);
second.hLayout = second.vLayout = Measures(20, 100, 20);
stack.addChild(second);
var third = new Button(???Third???);
third.hLayout = third.vLayout = Measures(20, 100, 20);
stack.addChild(third);
view.render();
}
}
Figure 13 - 4
GridLayout
The GridLayout is a convenient way to subdivide a region into equally divided rows and columns.
Each cell of the grid acts like a PanelLayout .


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