Group box object is based on Vertical Layout, so it lays objects vertically but with titled grouping border. The next example shows a group box with default parameters.
Group box constructor takes four parameters:
var layGroupBox = new TGroupBox(title, borderColor, margin, padding);
Group Box Layouts
You may use any layout to arrange your UI objects inside a group box. In the next example, we used a simple login form inside a group box.
Group Box Methods
| Method | Description |
|---|---|
| add | Adds UI object to the group box |
| alignLeft | Positions all UI object on the group box to the left. By default group box objects have center align |
| alignRight | Positions all UI object on the group box to the right. By default group box objects have center align |
| alignTitleLeft | Positions group box title to the left. By default group box title has center align |
| alignTitleRight | Positions group box title to the right. By default group box title has center align |
| setBorderColor | Sets group box border color. For example: layGroupBox.setBorderColor('#40B3DF'); |
| setTitle | Sets group box title text. For example: layGroupBox.setTitle('test'); |
| setTitleColor | Sets group box title text color. For example: layGroupBox.setTitleColor('#40B3DF'); |