diff options
Diffstat (limited to 'docs/xml/examples/TComboBox.ex1.pas')
-rw-r--r-- | docs/xml/examples/TComboBox.ex1.pas | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/xml/examples/TComboBox.ex1.pas b/docs/xml/examples/TComboBox.ex1.pas new file mode 100644 index 00000000..8414a9d6 --- /dev/null +++ b/docs/xml/examples/TComboBox.ex1.pas @@ -0,0 +1,10 @@ +{ This example shows how we can setup a static TComboBox } + cbStyle := TComboBox.Create(self); + cbStyle.CanExpandWidth := True; + cbStyle.Items.Add('Windows'); // insert items into the combobox + cbStyle.Items.Add('WindowsXP'); + cbStyle.Items.Add('Motif'); + cbStyle.Items.Add('ClearLooks'); + cbStyle.Items.Add('OpenSoft'); + cbStyle.OnChange := @cbStyleChanged; // setup an event handler + cbStyle.ItemIndex := 0; // select the first item |