summaryrefslogtreecommitdiff
path: root/examples/gui
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gui')
-rw-r--r--examples/gui/gridtest/gridtest.lpi18
-rw-r--r--examples/gui/gridtest/gridtest.lpr10
2 files changed, 21 insertions, 7 deletions
diff --git a/examples/gui/gridtest/gridtest.lpi b/examples/gui/gridtest/gridtest.lpi
index 8d6de301..a905d222 100644
--- a/examples/gui/gridtest/gridtest.lpi
+++ b/examples/gui/gridtest/gridtest.lpi
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
- <Version Value="8"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <StringTable Comments="" CompanyName="" FileDescription="" FileVersion="0.0.0.0" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -39,15 +41,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="9"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="gridtest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/gridtest/gridtest.lpr b/examples/gui/gridtest/gridtest.lpr
index f2c0b017..4c2c0e16 100644
--- a/examples/gui/gridtest/gridtest.lpr
+++ b/examples/gui/gridtest/gridtest.lpr
@@ -16,7 +16,8 @@ uses
fpg_button,
fpg_checkbox,
fpg_tab,
- fpg_edit;
+ fpg_edit,
+ fpg_dialogs;
type
@@ -42,6 +43,7 @@ type
chkSmoothScroll: TfpgCheckBox;
chkAlterColor: TfpgCheckBox;
{@VFD_HEAD_END: MainForm}
+ procedure StringGridHeaderClicked(Sender: TObject; ACol: Integer);
procedure StringGridDoubleClicked(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint);
procedure btnAddFiveClicked(Sender: TObject);
procedure btnAddOneClicked(Sender: TObject);
@@ -66,6 +68,11 @@ type
{ TMainForm }
+procedure TMainForm.StringGridHeaderClicked(Sender: TObject; ACol: Integer);
+begin
+ ShowMessage(Format('column %d clicked', [ACol]));
+end;
+
procedure TMainForm.StringGridDoubleClicked(Sender: TObject;
AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint);
var
@@ -245,6 +252,7 @@ begin
// Add custom painting
OnDrawCell := @StringGridDrawCell;
OnDoubleClick := @StringGridDoubleClicked;
+ OnHeaderClick := @StringGridHeaderClicked;
end;
chkShowHeader := TfpgCheckBox.Create(self);