The Vertical Layout

Vertical layout lays all UI objects vertically. In the next example, we created a simple form using vertical layout.

var btnSubmit = new TButton("Submit");
var layVertical = new TVerticalLayout();
var txtEmail = new TTextBox();
var wndVerticalLay = createWindow('Vertical Layout Sample');

layVertical.add(new TText('Enter your email:'));
layVertical.add(txtEmail);
layVertical.add(btnSubmit);

wndVerticalLay.add(layVertical);
showModal(wndVerticalLay);

Vertical layout constructor takes two optional parameters:

var layVertical = new TVerticalLayout(margin, padding);

Vertical Layout Methods
Method Description
add Adds UI object to the layout
alignLeft Positions all UI object on the layout to the left. By default layout objects have center align
alignRight Positions all UI object on the layout to the right. By default layout objects have center align