RxFPC: Add Font property for RxDBGrid.Collumn.Footer

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3620 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2014-10-02 11:12:42 +00:00
parent 03960e3649
commit 66a6f32eb3
5 changed files with 230 additions and 114 deletions

View File

@ -11,6 +11,7 @@
<ResourceType Value="res"/> <ResourceType Value="res"/>
<UseXPManifest Value="True"/> <UseXPManifest Value="True"/>
<Icon Value="0"/> <Icon Value="0"/>
<ActiveWindowIndexAtStart Value="0"/>
</General> </General>
<VersionInfo> <VersionInfo>
<UseVersionInfo Value="True"/> <UseVersionInfo Value="True"/>
@ -36,7 +37,7 @@
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local> </local>
</RunParams> </RunParams>
<RequiredPackages Count="6"> <RequiredPackages Count="5">
<Item1> <Item1>
<PackageName Value="rxdbgrid_export_spreadsheet"/> <PackageName Value="rxdbgrid_export_spreadsheet"/>
</Item1> </Item1>
@ -44,27 +45,23 @@
<PackageName Value="rxdbgrid_print"/> <PackageName Value="rxdbgrid_print"/>
</Item2> </Item2>
<Item3> <Item3>
<PackageName Value="IDEIntf"/> <PackageName Value="FCL"/>
<MinVersion Major="1" Valid="True"/> <MinVersion Major="1" Valid="True"/>
</Item3> </Item3>
<Item4> <Item4>
<PackageName Value="FCL"/> <PackageName Value="LCL"/>
<MinVersion Major="1" Valid="True"/>
</Item4> </Item4>
<Item5> <Item5>
<PackageName Value="LCL"/>
</Item5>
<Item6>
<PackageName Value="rxnew"/> <PackageName Value="rxnew"/>
<MinVersion Major="1" Release="18" Build="56" Valid="True"/> <MinVersion Major="1" Release="18" Build="56" Valid="True"/>
</Item6> </Item5>
</RequiredPackages> </RequiredPackages>
<Units Count="104"> <Units Count="106">
<Unit0> <Unit0>
<Filename Value="RxDBGridDemo.lpr"/> <Filename Value="RxDBGridDemo.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<CursorPos X="9" Y="16"/> <CursorPos X="9" Y="16"/>
<UsageCount Value="99"/> <UsageCount Value="100"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
<Filename Value="rxdbgridmainunit.pas"/> <Filename Value="rxdbgridmainunit.pas"/>
@ -73,8 +70,12 @@
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="RxDBGridMainUnit"/> <UnitName Value="RxDBGridMainUnit"/>
<CursorPos X="3" Y="10"/> <IsVisibleTab Value="True"/>
<UsageCount Value="99"/> <EditorIndex Value="0"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="10" Y="11"/>
<UsageCount Value="100"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<LoadedDesigner Value="True"/> <LoadedDesigner Value="True"/>
</Unit1> </Unit1>
@ -99,13 +100,14 @@
<Unit5> <Unit5>
<Filename Value="../../rxdbgrid.pas"/> <Filename Value="../../rxdbgrid.pas"/>
<UnitName Value="rxdbgrid"/> <UnitName Value="rxdbgrid"/>
<EditorIndex Value="2"/> <EditorIndex Value="1"/>
<TopLine Value="843"/> <WindowIndex Value="0"/>
<CursorPos X="23" Y="867"/> <TopLine Value="3475"/>
<CursorPos X="1" Y="3495"/>
<UsageCount Value="17"/> <UsageCount Value="17"/>
<Bookmarks Count="2"> <Bookmarks Count="2">
<Item0 Y="2564" ID="2"/> <Item0 X="1" Y="2573" ID="2"/>
<Item1 Y="3763" ID="1"/> <Item1 X="1" Y="3776" ID="1"/>
</Bookmarks> </Bookmarks>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit5> </Unit5>
@ -434,20 +436,25 @@
<Unit58> <Unit58>
<Filename Value="../../../../lcl/dbgrids.pas"/> <Filename Value="../../../../lcl/dbgrids.pas"/>
<UnitName Value="DBGrids"/> <UnitName Value="DBGrids"/>
<EditorIndex Value="3"/> <EditorIndex Value="2"/>
<TopLine Value="2940"/> <WindowIndex Value="0"/>
<CursorPos X="24" Y="2966"/> <TopLine Value="213"/>
<CursorPos X="3" Y="216"/>
<UsageCount Value="19"/> <UsageCount Value="19"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit58> </Unit58>
<Unit59> <Unit59>
<Filename Value="../../../../lcl/grids.pas"/> <Filename Value="../../../../lcl/grids.pas"/>
<TopLine Value="11283"/> <UnitName Value="Grids"/>
<CursorPos X="45" Y="11304"/> <EditorIndex Value="3"/>
<WindowIndex Value="0"/>
<TopLine Value="10079"/>
<CursorPos X="25" Y="10111"/>
<UsageCount Value="22"/> <UsageCount Value="22"/>
<Bookmarks Count="1"> <Bookmarks Count="1">
<Item0 X="23" Y="7562" ID="3"/> <Item0 X="23" Y="7562" ID="3"/>
</Bookmarks> </Bookmarks>
<Loaded Value="True"/>
</Unit59> </Unit59>
<Unit60> <Unit60>
<Filename Value="../../../../../../install/fpcsrc/rtl/objpas/classes/classesh.inc"/> <Filename Value="../../../../../../install/fpcsrc/rtl/objpas/classes/classesh.inc"/>
@ -563,9 +570,13 @@
</Unit77> </Unit77>
<Unit78> <Unit78>
<Filename Value="../../../../lcl/controls.pp"/> <Filename Value="../../../../lcl/controls.pp"/>
<TopLine Value="2126"/> <UnitName Value="Controls"/>
<CursorPos X="15" Y="2146"/> <EditorIndex Value="4"/>
<WindowIndex Value="0"/>
<TopLine Value="2211"/>
<CursorPos X="15" Y="2233"/>
<UsageCount Value="11"/> <UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit78> </Unit78>
<Unit79> <Unit79>
<Filename Value="../../../../lcl/stdctrls.pp"/> <Filename Value="../../../../lcl/stdctrls.pp"/>
@ -712,111 +723,147 @@
<Unit103> <Unit103>
<Filename Value="../../rxdbgridexportspreadsheet.pas"/> <Filename Value="../../rxdbgridexportspreadsheet.pas"/>
<UnitName Value="RxDBGridExportSpreadSheet"/> <UnitName Value="RxDBGridExportSpreadSheet"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="185"/> <TopLine Value="185"/>
<CursorPos Y="208"/> <CursorPos X="12" Y="203"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit103> </Unit103>
<Unit104>
<Filename Value="../../../fpspreadsheet/fpsexprparser.pas"/>
<UnitName Value="fpsExprParser"/>
<WindowIndex Value="1"/>
<TopLine Value="820"/>
<CursorPos X="48" Y="833"/>
<UsageCount Value="10"/>
</Unit104>
<Unit105>
<Filename Value="/home/alexs/install/src/fixes_2_6/rtl/objpas/classes/classesh.inc"/>
<WindowIndex Value="0"/>
<TopLine Value="471"/>
<CursorPos X="15" Y="491"/>
<UsageCount Value="10"/>
</Unit105>
</Units> </Units>
<JumpHistory Count="24" HistoryIndex="23"> <JumpHistory Count="30" HistoryIndex="29">
<Position1> <Position1>
<Filename Value="../../rxdbgrid.pas"/> <Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="867" Column="35" TopLine="845"/> <Caret Line="539" Column="30" TopLine="520"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="../../rxdbgrid.pas"/> <Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="110" Column="50" TopLine="89"/> <Caret Line="11456" Column="18" TopLine="11424"/>
</Position2> </Position2>
<Position3> <Position3>
<Filename Value="../../rxdbgrid.pas"/> <Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="875" Column="61" TopLine="855"/> <Caret Line="11484" Column="38" TopLine="11452"/>
</Position3> </Position3>
<Position4> <Position4>
<Filename Value="../../rxdbgrid.pas"/> <Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="708" Column="39" TopLine="706"/> <Caret Line="594" Column="17" TopLine="574"/>
</Position4> </Position4>
<Position5> <Position5>
<Filename Value="../../rxdbgrid.pas"/> <Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="3763" Column="24" TopLine="3744"/> <Caret Line="11456" Column="18" TopLine="11424"/>
</Position5> </Position5>
<Position6> <Position6>
<Filename Value="../../rxdbgrid.pas"/> <Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="5712" TopLine="5677"/> <Caret Line="10954" Column="3" TopLine="10952"/>
</Position6> </Position6>
<Position7> <Position7>
<Filename Value="../../rxdbgrid.pas"/> <Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="110" Column="48" TopLine="88"/> <Caret Line="11414" Column="3" TopLine="11411"/>
</Position7> </Position7>
<Position8> <Position8>
<Filename Value="../../rxdbgrid.pas"/> <Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="875" Column="63" TopLine="854"/> <Caret Line="529" Column="15" TopLine="510"/>
</Position8> </Position8>
<Position9> <Position9>
<Filename Value="rxdbgridmainunit.pas"/> <Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="76" Column="15" TopLine="62"/> <Caret Line="539" Column="30" TopLine="498"/>
</Position9> </Position9>
<Position10> <Position10>
<Filename Value="rxdbgridmainunit.pas"/> <Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="75" Column="15" TopLine="62"/> <Caret Line="11456" Column="18" TopLine="11424"/>
</Position10> </Position10>
<Position11> <Position11>
<Filename Value="rxdbgridmainunit.pas"/> <Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="76" Column="15" TopLine="63"/> <Caret Line="11484" Column="38" TopLine="11461"/>
</Position11> </Position11>
<Position12> <Position12>
<Filename Value="rxdbgridmainunit.pas"/> <Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="77" Column="15" TopLine="64"/> <Caret Line="588" Column="26" TopLine="568"/>
</Position12> </Position12>
<Position13> <Position13>
<Filename Value="rxdbgridmainunit.pas"/> <Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="79" Column="15" TopLine="66"/> <Caret Line="808" Column="33" TopLine="777"/>
</Position13> </Position13>
<Position14> <Position14>
<Filename Value="rxdbgridmainunit.pas"/> <Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="78" Column="15" TopLine="65"/> <Caret Line="657" Column="26" TopLine="624"/>
</Position14> </Position14>
<Position15> <Position15>
<Filename Value="rxdbgridmainunit.pas"/> <Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="79" Column="15" TopLine="66"/> <Caret Line="808" Column="33" TopLine="777"/>
</Position15> </Position15>
<Position16> <Position16>
<Filename Value="rxdbgridmainunit.pas"/> <Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="161" Column="62" TopLine="158"/> <Caret Line="7569" Column="3" TopLine="7565"/>
</Position16> </Position16>
<Position17> <Position17>
<Filename Value="../../rxdbgrid.pas"/> <Filename Value="../../rxdbgrid.pas"/>
<Caret Line="3753" Column="6" TopLine="3743"/> <Caret Line="258" Column="14" TopLine="242"/>
</Position17> </Position17>
<Position18> <Position18>
<Filename Value="rxdbgridmainunit.pas"/> <Filename Value="../../rxdbgrid.pas"/>
<Caret Line="80" TopLine="78"/> <Caret Line="427" Column="29" TopLine="395"/>
</Position18> </Position18>
<Position19> <Position19>
<Filename Value="rxdbgridmainunit.pas"/> <Filename Value="../../rxdbgrid.pas"/>
<Caret Line="100" Column="50" TopLine="84"/> <Caret Line="440" Column="40" TopLine="408"/>
</Position19> </Position19>
<Position20> <Position20>
<Filename Value="../../rxdbgrid.pas"/> <Filename Value="../../rxdbgrid.pas"/>
<Caret Line="867" Column="23" TopLine="843"/> <Caret Line="446" Column="54" TopLine="414"/>
</Position20> </Position20>
<Position21> <Position21>
<Filename Value="../../../../lcl/dbgrids.pas"/> <Filename Value="../../rxdbgrid.pas"/>
<Caret Line="436" Column="14" TopLine="423"/> <Caret Line="465" Column="37" TopLine="433"/>
</Position21> </Position21>
<Position22> <Position22>
<Filename Value="../../../../lcl/dbgrids.pas"/> <Filename Value="../../rxdbgrid.pas"/>
<Caret Line="481" Column="33" TopLine="457"/> <Caret Line="5197" Column="46" TopLine="5165"/>
</Position22> </Position22>
<Position23> <Position23>
<Filename Value="../../../../lcl/dbgrids.pas"/> <Filename Value="../../rxdbgrid.pas"/>
<Caret Line="596" Column="33" TopLine="572"/> <Caret Line="5207" Column="60" TopLine="5175"/>
</Position23> </Position23>
<Position24> <Position24>
<Filename Value="../../../../lcl/dbgrids.pas"/> <Filename Value="../../rxdbgrid.pas"/>
<Caret Line="2980" Column="34" TopLine="2955"/> <Caret Line="5267" Column="29" TopLine="5235"/>
</Position24> </Position24>
<Position25>
<Filename Value="../../rxdbgrid.pas"/>
<Caret Line="3475" Column="5" TopLine="3475"/>
</Position25>
<Position26>
<Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="4114" Column="3" TopLine="4109"/>
</Position26>
<Position27>
<Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="7570" Column="16" TopLine="7538"/>
</Position27>
<Position28>
<Filename Value="../../../../lcl/grids.pas"/>
<Caret Line="8218" Column="17" TopLine="8186"/>
</Position28>
<Position29>
<Filename Value="rxdbgridmainunit.pas"/>
<Caret Line="10" Column="3" TopLine="1"/>
</Position29>
<Position30>
<Filename Value="rxdbgridmainunit.pas"/>
<Caret Line="11" Column="10" TopLine="1"/>
</Position30>
</JumpHistory> </JumpHistory>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
@ -840,6 +887,9 @@
</Win32> </Win32>
</Options> </Options>
</Linking> </Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions> </CompilerOptions>
<Debugging> <Debugging>
<Watches Count="5"> <Watches Count="5">
@ -868,4 +918,5 @@
</Item2> </Item2>
</Exceptions> </Exceptions>
</Debugging> </Debugging>
<EditorMacros Count="0"/>
</CONFIG> </CONFIG>

View File

@ -5,17 +5,17 @@ object RxDBGridMainForm: TRxDBGridMainForm
Width = 1151 Width = 1151
ActiveControl = Panel1 ActiveControl = Panel1
Caption = 'RxDBGrid Demo' Caption = 'RxDBGrid Demo'
ClientHeight = 696 ClientHeight = 694
ClientWidth = 1151 ClientWidth = 1151
Menu = MainMenu1 Menu = MainMenu1
OnCreate = FormCreate OnCreate = FormCreate
SessionProperties = 'RxDBGridExportSpreadSheet1.FileName;RxDBGridExportSpreadSheet1.OpenAfterExport;RxDBGridExportSpreadSheet1.Options;RxDBGridExportSpreadSheet1.PageName;RxDBGridPrint1.Options;RxDBGridPrint1.Orientation;RxDBGridPrint1.PageMargin;RxDBGridPrint1.ReportTitle;RxDBGridPrint1.ShowColumnHeaderOnAllPage' SessionProperties = 'RxDBGridExportSpreadSheet1.FileName;RxDBGridExportSpreadSheet1.OpenAfterExport;RxDBGridExportSpreadSheet1.Options;RxDBGridExportSpreadSheet1.PageName;RxDBGridPrint1.Options;RxDBGridPrint1.Orientation;RxDBGridPrint1.PageMargin;RxDBGridPrint1.ReportTitle;RxDBGridPrint1.ShowColumnHeaderOnAllPage'
ShowHint = True ShowHint = True
LCLVersion = '1.3' LCLVersion = '1.2.4.0'
object RxDBGrid1: TRxDBGrid object RxDBGrid1: TRxDBGrid
Left = 0 Left = 0
Height = 630 Height = 624
Top = 66 Top = 70
Width = 1151 Width = 1151
TitleButtons = True TitleButtons = True
AutoSort = True AutoSort = True
@ -80,6 +80,12 @@ object RxDBGridMainForm: TRxDBGridMainForm
Filter.EmptyValue = '(Нет)' Filter.EmptyValue = '(Нет)'
Filter.EmptyFont.Style = [fsItalic] Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1 Filter.ItemIndex = -1
Footer.Value = 'This is test'
Footer.ValueType = fvtStaticText
Footer.Font.Color = clRed
Footer.Font.Height = -15
Footer.Font.Name = 'Liberation Mono'
Footer.Font.Style = [fsBold, fsItalic]
end end
item item
Title.Alignment = taCenter Title.Alignment = taCenter
@ -131,6 +137,8 @@ object RxDBGridMainForm: TRxDBGridMainForm
Footer.DisplayFormat = '#,##0.00' Footer.DisplayFormat = '#,##0.00'
Footer.FieldName = 'PRICE' Footer.FieldName = 'PRICE'
Footer.ValueType = fvtSum Footer.ValueType = fvtSum
Footer.Font.Color = clPurple
Footer.Font.Style = [fsBold, fsItalic]
end end
item item
Title.Alignment = taCenter Title.Alignment = taCenter
@ -297,22 +305,22 @@ object RxDBGridMainForm: TRxDBGridMainForm
end end
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Height = 66 Height = 70
Top = 0 Top = 0
Width = 1151 Width = 1151
Align = alTop Align = alTop
AutoSize = True AutoSize = True
ClientHeight = 66 ClientHeight = 70
ClientWidth = 1151 ClientWidth = 1151
TabOrder = 1 TabOrder = 1
object Label1: TLabel object Label1: TLabel
AnchorSideLeft.Control = Button2 AnchorSideLeft.Control = Button2
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Panel1 AnchorSideTop.Control = Panel1
Left = 262 Left = 274
Height = 19 Height = 21
Top = 7 Top = 7
Width = 34 Width = 36
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'Mode' Caption = 'Mode'
ParentColor = False ParentColor = False
@ -321,9 +329,9 @@ object RxDBGridMainForm: TRxDBGridMainForm
AnchorSideLeft.Control = Panel1 AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = Panel1 AnchorSideTop.Control = Panel1
Left = 7 Left = 7
Height = 31 Height = 33
Top = 7 Top = 7
Width = 85 Width = 89
Action = actCalcTotal Action = actCalcTotal
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -333,10 +341,10 @@ object RxDBGridMainForm: TRxDBGridMainForm
AnchorSideLeft.Control = Button1 AnchorSideLeft.Control = Button1
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Panel1 AnchorSideTop.Control = Panel1
Left = 98 Left = 102
Height = 31 Height = 33
Top = 7 Top = 7
Width = 158 Width = 166
Action = actOptimizeColumnsWidthAll Action = actOptimizeColumnsWidthAll
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -347,11 +355,11 @@ object RxDBGridMainForm: TRxDBGridMainForm
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = CheckBox2 AnchorSideTop.Control = CheckBox2
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 491 Left = 503
Height = 23 Height = 25
Hint = 'Use filter line' Hint = 'Use filter line'
Top = 36 Top = 38
Width = 80 Width = 85
BorderSpacing.Left = 6 BorderSpacing.Left = 6
Caption = 'Use filter' Caption = 'Use filter'
OnChange = CheckBox1Change OnChange = CheckBox1Change
@ -361,9 +369,9 @@ object RxDBGridMainForm: TRxDBGridMainForm
AnchorSideLeft.Control = Label1 AnchorSideLeft.Control = Label1
AnchorSideTop.Control = Label1 AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 268 Left = 280
Height = 27 Height = 29
Top = 32 Top = 34
Width = 217 Width = 217
BorderSpacing.Around = 6 BorderSpacing.Around = 6
ItemHeight = 0 ItemHeight = 0
@ -381,11 +389,11 @@ object RxDBGridMainForm: TRxDBGridMainForm
AnchorSideLeft.Control = ComboBox1 AnchorSideLeft.Control = ComboBox1
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Panel1 AnchorSideTop.Control = Panel1
Left = 491 Left = 503
Height = 23 Height = 25
Hint = 'Auto fill column width' Hint = 'Auto fill column width'
Top = 7 Top = 7
Width = 125 Width = 134
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'Auto fill columns' Caption = 'Auto fill columns'
OnChange = CheckBox2Change OnChange = CheckBox2Change
@ -395,10 +403,10 @@ object RxDBGridMainForm: TRxDBGridMainForm
AnchorSideLeft.Control = CheckBox2 AnchorSideLeft.Control = CheckBox2
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Panel1 AnchorSideTop.Control = Panel1
Left = 622 Left = 643
Height = 23 Height = 25
Top = 7 Top = 7
Width = 116 Width = 122
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'Show indicator' Caption = 'Show indicator'
Checked = True Checked = True
@ -411,10 +419,10 @@ object RxDBGridMainForm: TRxDBGridMainForm
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = CheckBox3 AnchorSideTop.Control = CheckBox3
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 622 Left = 643
Height = 23 Height = 25
Top = 36 Top = 38
Width = 112 Width = 118
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'Show headers' Caption = 'Show headers'
Checked = True Checked = True
@ -426,10 +434,10 @@ object RxDBGridMainForm: TRxDBGridMainForm
AnchorSideLeft.Control = CheckBox3 AnchorSideLeft.Control = CheckBox3
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Panel1 AnchorSideTop.Control = Panel1
Left = 744 Left = 771
Height = 23 Height = 25
Top = 7 Top = 7
Width = 95 Width = 97
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'Word wrap' Caption = 'Word wrap'
OnChange = CheckBox5Change OnChange = CheckBox5Change

View File

@ -8,7 +8,7 @@ uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, rxmemds, Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, rxmemds,
DB, rxdbgrid, RxAboutDialog, RxIniPropStorage, RxDBGridPrintGrid, DB, rxdbgrid, RxAboutDialog, RxIniPropStorage, RxDBGridPrintGrid,
RxDBGridExportSpreadSheet, ExtCtrls, Buttons, Menus, ActnList, StdCtrls, RxDBGridExportSpreadSheet, ExtCtrls, Buttons, Menus, ActnList, StdCtrls,
DBGrids, XMLPropStorage, types; DBGrids, types;
type type

View File

@ -52,14 +52,14 @@
// //
{.$DEFINE DBDateEdit_OLD} {.$DEFINE DBDateEdit_OLD}
{.$DEFINE OLD_EDITBUTTON} {$DEFINE OLD_EDITBUTTON}
{$if FPC_FULLVERSION<20701} {$if FPC_FULLVERSION<20701}
{$DEFINE NoAutomatedBookmark} {$DEFINE NoAutomatedBookmark}
{$DEFINE RX_USE_LCL_DEVEL} {$DEFINE RX_USE_LCL_DEVEL}
{$endif} {$endif}
{$IFDEF OLD_EDITBUTTON} {.$IFDEF OLD_EDITBUTTON}
{$if FPC_FULLVERSION<20701} {$if FPC_FULLVERSION<20701}
{$DEFINE RX_USE_LAZARUS_RESOURCE} {$DEFINE RX_USE_LAZARUS_RESOURCE}
{$ENDIF} {$ENDIF}

View File

@ -257,19 +257,25 @@ type
TRxColumnFooter = class(TPersistent) TRxColumnFooter = class(TPersistent)
private private
FIsDefaultFont: boolean;
FLayout: TTextLayout; FLayout: TTextLayout;
FOwner: TRxColumn; FOwner: TRxColumn;
FAlignment: TAlignment; FAlignment: TAlignment;
FDisplayFormat: string; FDisplayFormat: string;
FFieldName: string; FFieldName: string;
FField:TField; FField:TField;
FFont: TFont;
FValue: string; FValue: string;
FValueType: TFooterValueType; FValueType: TFooterValueType;
FTestValue: double; FTestValue: double;
FCountRec:integer; FCountRec:integer;
procedure FontChanged(Sender: TObject);
function GetFont: TFont;
function IsFontStored: Boolean;
procedure SetAlignment(const AValue: TAlignment); procedure SetAlignment(const AValue: TAlignment);
procedure SetDisplayFormat(const AValue: string); procedure SetDisplayFormat(const AValue: string);
procedure SetFieldName(const AValue: string); procedure SetFieldName(const AValue: string);
procedure SetFont(AValue: TFont);
procedure SetLayout(const AValue: TTextLayout); procedure SetLayout(const AValue: TTextLayout);
procedure SetValue(const AValue: string); procedure SetValue(const AValue: string);
procedure SetValueType(const AValue: TFooterValueType); procedure SetValueType(const AValue: TFooterValueType);
@ -285,11 +291,14 @@ type
function ErrorTestValue: boolean; function ErrorTestValue: boolean;
protected protected
procedure UpdateTestValueFromVar(AValue:Variant); procedure UpdateTestValueFromVar(AValue:Variant);
property IsDefaultFont: boolean read FIsDefaultFont;
public public
constructor Create(Owner: TRxColumn); constructor Create(Owner: TRxColumn);
destructor Destroy; override;
property Owner: TRxColumn read FOwner; property Owner: TRxColumn read FOwner;
property NumericValue: double read FTestValue; property NumericValue: double read FTestValue;
function DisplayText: string; function DisplayText: string;
procedure FillDefaultFont;
published published
property Alignment: TAlignment read FAlignment write SetAlignment default property Alignment: TAlignment read FAlignment write SetAlignment default
taLeftJustify; taLeftJustify;
@ -297,8 +306,8 @@ type
property DisplayFormat: string read FDisplayFormat write SetDisplayFormat; property DisplayFormat: string read FDisplayFormat write SetDisplayFormat;
property FieldName: string read FFieldName write SetFieldName; property FieldName: string read FFieldName write SetFieldName;
property Value: string read FValue write SetValue; property Value: string read FValue write SetValue;
property ValueType: TFooterValueType property ValueType: TFooterValueType read FValueType write SetValueType default fvtNon;
read FValueType write SetValueType default fvtNon; property Font: TFont read GetFont write SetFont stored IsFontStored;
end; end;
@ -3482,6 +3491,10 @@ if ScrollBarIsVisible(SB_HORZ) then
TxS.Alignment := C.Footer.Alignment; TxS.Alignment := C.Footer.Alignment;
TxS.Layout := C.Footer.Layout; TxS.Layout := C.Footer.Layout;
Canvas.TextStyle := TxS; Canvas.TextStyle := TxS;
if not C.Footer.IsDefaultFont then
Canvas.Font:=C.Footer.Font
else
Canvas.Font:=Font;
DrawCellText(i, 0, R, [], C.Footer.DisplayText); DrawCellText(i, 0, R, [], C.Footer.DisplayText);
end; end;
end; end;
@ -5399,6 +5412,22 @@ begin
FOwner.ColumnChanged; FOwner.ColumnChanged;
end; end;
procedure TRxColumnFooter.FontChanged(Sender: TObject);
begin
FisDefaultFont := False;
FOwner.ColumnChanged;
end;
function TRxColumnFooter.GetFont: TFont;
begin
result := FFont;
end;
function TRxColumnFooter.IsFontStored: Boolean;
begin
result := not FisDefaultFont;
end;
procedure TRxColumnFooter.SetFieldName(const AValue: string); procedure TRxColumnFooter.SetFieldName(const AValue: string);
begin begin
if FFieldName = AValue then if FFieldName = AValue then
@ -5407,6 +5436,12 @@ begin
FOwner.ColumnChanged; FOwner.ColumnChanged;
end; end;
procedure TRxColumnFooter.SetFont(AValue: TFont);
begin
if not FFont.IsEqual(AValue) then
FFont.Assign(AValue);
end;
procedure TRxColumnFooter.SetLayout(const AValue: TTextLayout); procedure TRxColumnFooter.SetLayout(const AValue: TTextLayout);
begin begin
if FLayout = AValue then if FLayout = AValue then
@ -5441,6 +5476,18 @@ begin
end; end;
end; end;
procedure TRxColumnFooter.FillDefaultFont;
var
AGrid: TCustomGrid;
begin
AGrid := FOwner.Grid;
if (AGrid<>nil) then
begin
FFont.Assign(AGrid.Font);
FIsDefaultFont := True;
end;
end;
function TRxColumnFooter.GetFieldValue: string; function TRxColumnFooter.GetFieldValue: string;
begin begin
if (FFieldName <> '') and TRxDBGrid(FOwner.Grid).DatalinkActive then if (FFieldName <> '') and TRxDBGrid(FOwner.Grid).DatalinkActive then
@ -5752,6 +5799,16 @@ begin
FOwner := Owner; FOwner := Owner;
FTestValue := 0; FTestValue := 0;
FLayout := tlCenter; FLayout := tlCenter;
FFont := TFont.Create;
FillDefaultFont;
FFont.OnChange := @FontChanged;
end;
destructor TRxColumnFooter.Destroy;
begin
FreeThenNil(FFont);
inherited Destroy;
end; end;
{ TFilterListCellEditor } { TFilterListCellEditor }