diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-04-29 09:05:53 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-04-29 09:05:53 +0000 |
commit | 9e9d3f550ed7170cab0630fe919edbebb3f8fc6f (patch) | |
tree | cd8049b37b7c46bbf6c0389f34fba959f2cd2907 /examples | |
parent | 34cea51c0008e63542dbd0fb843922ff7df4339e (diff) | |
download | fpGUI-9e9d3f550ed7170cab0630fe919edbebb3f8fc6f.tar.xz |
* The default look of the PageControl has been improved. It now looks like the Win2000 tabs.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/gui/tabtest/tabtest.lpr | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/examples/gui/tabtest/tabtest.lpr b/examples/gui/tabtest/tabtest.lpr index 813c5b45..23feb0cc 100644 --- a/examples/gui/tabtest/tabtest.lpr +++ b/examples/gui/tabtest/tabtest.lpr @@ -7,7 +7,7 @@ uses cthreads, {$ENDIF}{$ENDIF} Classes, fpgfx, gfx_widget, gfxbase, gui_form, gui_tab, gui_button, - gui_label, gui_edit, gui_checkbox; + gui_label, gui_edit, gui_checkbox, gui_combobox; type TMainForm = class(TfpgForm) @@ -20,10 +20,12 @@ type tsFour: TfpgTabSheet; btn2, btn3, btn4: TfpgButton; chkSort: TfpgCheckBox; + cbTabPos: TfpgComboBox; procedure btnQuitClick(Sender: TObject); procedure btn2Click(Sender: TObject); procedure btn3Click(Sender: TObject); procedure chkSortChange(Sender: TObject); + procedure cbTabPosChanged(Sender: TObject); public constructor Create(AOwner: TComponent); override; end; @@ -57,6 +59,14 @@ begin btn3.Enabled := not chkSort.Checked; end; +procedure TMainForm.cbTabPosChanged(Sender: TObject); +begin + if cbTabPos.FocusItem = 1 then + pcMain.TabPosition := tpTop + else + pcMain.TabPosition := tpBottom; +end; + constructor TMainForm.Create(AOwner: TComponent); begin inherited Create(AOwner); @@ -108,6 +118,12 @@ begin chkSort := CreateCheckBox(self, 190, 320, 'Sort Tabs'); chkSort.OnChange := @chkSortChange; + + cbTabPos := CreateComboBox(self, 300, 320, 80, nil); + cbTabPos.Items.Add('tpTop'); + cbTabPos.Items.Add('tpBottom'); + cbTabPos.FocusItem := 1; + cbTabPos.OnChange := @cbTabPosChanged; end; procedure MainProc; |