diff options
Diffstat (limited to 'docs/xml/examples/TGroupBox.ex1.pas')
-rw-r--r-- | docs/xml/examples/TGroupBox.ex1.pas | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/xml/examples/TGroupBox.ex1.pas b/docs/xml/examples/TGroupBox.ex1.pas new file mode 100644 index 00000000..088352e8 --- /dev/null +++ b/docs/xml/examples/TGroupBox.ex1.pas @@ -0,0 +1,20 @@ +{ The following example shows how we can set up a TGroupBox with a layout } + grpOne := TGroupBox.Create('Group Box 1', self); + grpOne.CanExpandWidth := True; + + VBox1 := TBoxLayout.Create(self); + VBox1.Orientation := Vertical; + grpOne.InsertChild(VBox1); + + Radio1 := TRadioButton.Create('Radio button 1', self); + Radio2 := TRadioButton.Create('Radio button 2', self); + Radio3 := TRadioButton.Create('Radio button 3', self); + + Radio1.Checked := True; + Radio1.CanExpandWidth := True; + Radio2.CanExpandWidth := True; + Radio3.CanExpandWidth := True; + + VBox1.InsertChild(Radio1); + VBox1.InsertChild(Radio2); + VBox1.InsertChild(Radio3); |