You've already forked lazarus-ccr
RxFPC:RxDBGrid - SelectedFont property and demo
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6156 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
BIN
components/rx/trunk/demos/rxdbgrid/SelectedFont/project1.ico
Normal file
BIN
components/rx/trunk/demos/rxdbgrid/SelectedFont/project1.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
83
components/rx/trunk/demos/rxdbgrid/SelectedFont/project1.lpi
Normal file
83
components/rx/trunk/demos/rxdbgrid/SelectedFont/project1.lpi
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<CONFIG>
|
||||||
|
<ProjectOptions>
|
||||||
|
<Version Value="11"/>
|
||||||
|
<General>
|
||||||
|
<SessionStorage Value="InProjectDir"/>
|
||||||
|
<MainUnit Value="0"/>
|
||||||
|
<Title Value="RxDBGrid demo - SelectedFont"/>
|
||||||
|
<Scaled Value="True"/>
|
||||||
|
<ResourceType Value="res"/>
|
||||||
|
<UseXPManifest Value="True"/>
|
||||||
|
<XPManifest>
|
||||||
|
<DpiAware Value="True"/>
|
||||||
|
</XPManifest>
|
||||||
|
<Icon Value="0"/>
|
||||||
|
</General>
|
||||||
|
<BuildModes Count="1">
|
||||||
|
<Item1 Name="Default" Default="True"/>
|
||||||
|
</BuildModes>
|
||||||
|
<PublishOptions>
|
||||||
|
<Version Value="2"/>
|
||||||
|
</PublishOptions>
|
||||||
|
<RunParams>
|
||||||
|
<FormatVersion Value="2"/>
|
||||||
|
<Modes Count="0"/>
|
||||||
|
</RunParams>
|
||||||
|
<RequiredPackages Count="3">
|
||||||
|
<Item1>
|
||||||
|
<PackageName Value="FCL"/>
|
||||||
|
</Item1>
|
||||||
|
<Item2>
|
||||||
|
<PackageName Value="rxnew"/>
|
||||||
|
</Item2>
|
||||||
|
<Item3>
|
||||||
|
<PackageName Value="LCL"/>
|
||||||
|
</Item3>
|
||||||
|
</RequiredPackages>
|
||||||
|
<Units Count="2">
|
||||||
|
<Unit0>
|
||||||
|
<Filename Value="project1.lpr"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
</Unit0>
|
||||||
|
<Unit1>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="Form1"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<UnitName Value="Unit1"/>
|
||||||
|
</Unit1>
|
||||||
|
</Units>
|
||||||
|
</ProjectOptions>
|
||||||
|
<CompilerOptions>
|
||||||
|
<Version Value="11"/>
|
||||||
|
<Target>
|
||||||
|
<Filename Value="project1"/>
|
||||||
|
</Target>
|
||||||
|
<SearchPaths>
|
||||||
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
|
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||||
|
</SearchPaths>
|
||||||
|
<Linking>
|
||||||
|
<Options>
|
||||||
|
<Win32>
|
||||||
|
<GraphicApplication Value="True"/>
|
||||||
|
</Win32>
|
||||||
|
</Options>
|
||||||
|
</Linking>
|
||||||
|
</CompilerOptions>
|
||||||
|
<Debugging>
|
||||||
|
<Exceptions Count="3">
|
||||||
|
<Item1>
|
||||||
|
<Name Value="EAbort"/>
|
||||||
|
</Item1>
|
||||||
|
<Item2>
|
||||||
|
<Name Value="ECodetoolError"/>
|
||||||
|
</Item2>
|
||||||
|
<Item3>
|
||||||
|
<Name Value="EFOpenError"/>
|
||||||
|
</Item3>
|
||||||
|
</Exceptions>
|
||||||
|
</Debugging>
|
||||||
|
</CONFIG>
|
23
components/rx/trunk/demos/rxdbgrid/SelectedFont/project1.lpr
Normal file
23
components/rx/trunk/demos/rxdbgrid/SelectedFont/project1.lpr
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
program project1;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
uses
|
||||||
|
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||||
|
cthreads,
|
||||||
|
{$ENDIF}{$ENDIF}
|
||||||
|
Interfaces, // this includes the LCL widgetset
|
||||||
|
Forms, rxnew, Unit1
|
||||||
|
{ you can add units after this };
|
||||||
|
|
||||||
|
{$R *.res}
|
||||||
|
|
||||||
|
begin
|
||||||
|
Application.Title:='RxDBGrid demo - SelectedFont';
|
||||||
|
RequireDerivedFormResource:=True;
|
||||||
|
Application.Scaled:=True;
|
||||||
|
Application.Initialize;
|
||||||
|
Application.CreateForm(TForm1, Form1);
|
||||||
|
Application.Run;
|
||||||
|
end.
|
||||||
|
|
227
components/rx/trunk/demos/rxdbgrid/SelectedFont/project1.lps
Normal file
227
components/rx/trunk/demos/rxdbgrid/SelectedFont/project1.lps
Normal file
@@ -0,0 +1,227 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<CONFIG>
|
||||||
|
<ProjectSession>
|
||||||
|
<Version Value="11"/>
|
||||||
|
<BuildModes Active="Default"/>
|
||||||
|
<Units Count="10">
|
||||||
|
<Unit0>
|
||||||
|
<Filename Value="project1.lpr"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<WindowIndex Value="-1"/>
|
||||||
|
<TopLine Value="-1"/>
|
||||||
|
<CursorPos X="-1" Y="-1"/>
|
||||||
|
<UsageCount Value="20"/>
|
||||||
|
</Unit0>
|
||||||
|
<Unit1>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="Form1"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<UnitName Value="Unit1"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
|
<TopLine Value="41"/>
|
||||||
|
<CursorPos X="78" Y="63"/>
|
||||||
|
<UsageCount Value="20"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
<LoadedDesigner Value="True"/>
|
||||||
|
</Unit1>
|
||||||
|
<Unit2>
|
||||||
|
<Filename Value="../../../../install/source/fpcsrc/rtl/objpas/sysutils/dati.inc"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<TopLine Value="735"/>
|
||||||
|
<CursorPos Y="754"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit2>
|
||||||
|
<Unit3>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<EditorIndex Value="2"/>
|
||||||
|
<TopLine Value="848"/>
|
||||||
|
<CursorPos X="17" Y="879"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Bookmarks Count="2">
|
||||||
|
<Item0 Y="311" ID="1"/>
|
||||||
|
<Item1 X="30" Y="7484" ID="2"/>
|
||||||
|
</Bookmarks>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit3>
|
||||||
|
<Unit4>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/lcl/dbgrids.pas"/>
|
||||||
|
<UnitName Value="DBGrids"/>
|
||||||
|
<EditorIndex Value="4"/>
|
||||||
|
<TopLine Value="2725"/>
|
||||||
|
<CursorPos X="3" Y="2730"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit4>
|
||||||
|
<Unit5>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/lcl/graphics.pp"/>
|
||||||
|
<UnitName Value="Graphics"/>
|
||||||
|
<EditorIndex Value="3"/>
|
||||||
|
<TopLine Value="557"/>
|
||||||
|
<CursorPos X="22" Y="580"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit5>
|
||||||
|
<Unit6>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||||
|
<UnitName Value="Grids"/>
|
||||||
|
<EditorIndex Value="5"/>
|
||||||
|
<TopLine Value="5269"/>
|
||||||
|
<CursorPos Y="5278"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit6>
|
||||||
|
<Unit7>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/lcl/include/font.inc"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<TopLine Value="760"/>
|
||||||
|
<CursorPos X="3" Y="765"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit7>
|
||||||
|
<Unit8>
|
||||||
|
<Filename Value="unit1.lfm"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<CursorPos X="7" Y="12"/>
|
||||||
|
<FoldState Value=" T0B2}= T1mfEj1;"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<DefaultSyntaxHighlighter Value="LFM"/>
|
||||||
|
</Unit8>
|
||||||
|
<Unit9>
|
||||||
|
<Filename Value="../../../../install/source/fpcsrc/rtl/objpas/sysutils/sysinth.inc"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<TopLine Value="84"/>
|
||||||
|
<CursorPos X="45" Y="103"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit9>
|
||||||
|
</Units>
|
||||||
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
|
<Position1>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="7455" Column="3" TopLine="7451"/>
|
||||||
|
</Position1>
|
||||||
|
<Position2>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="409" Column="14" TopLine="389"/>
|
||||||
|
</Position2>
|
||||||
|
<Position3>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="7428" Column="3" TopLine="7426"/>
|
||||||
|
</Position3>
|
||||||
|
<Position4>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="410" Column="14" TopLine="392"/>
|
||||||
|
</Position4>
|
||||||
|
<Position5>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="7436" Column="3" TopLine="7432"/>
|
||||||
|
</Position5>
|
||||||
|
<Position6>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="411" Column="14" TopLine="393"/>
|
||||||
|
</Position6>
|
||||||
|
<Position7>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="7441" Column="3" TopLine="7437"/>
|
||||||
|
</Position7>
|
||||||
|
<Position8>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="412" Column="14" TopLine="394"/>
|
||||||
|
</Position8>
|
||||||
|
<Position9>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="7446" Column="3" TopLine="7442"/>
|
||||||
|
</Position9>
|
||||||
|
<Position10>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="569" Column="27" TopLine="558"/>
|
||||||
|
</Position10>
|
||||||
|
<Position11>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="1332" Column="3" TopLine="1330"/>
|
||||||
|
</Position11>
|
||||||
|
<Position12>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="569" Column="15" TopLine="550"/>
|
||||||
|
</Position12>
|
||||||
|
<Position13>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="1332" Column="36" TopLine="1330"/>
|
||||||
|
</Position13>
|
||||||
|
<Position14>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="571" Column="15" TopLine="550"/>
|
||||||
|
</Position14>
|
||||||
|
<Position15>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="1355" Column="3" TopLine="1353"/>
|
||||||
|
</Position15>
|
||||||
|
<Position16>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="572" Column="14" TopLine="552"/>
|
||||||
|
</Position16>
|
||||||
|
<Position17>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="1360" Column="3" TopLine="1358"/>
|
||||||
|
</Position17>
|
||||||
|
<Position18>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="576" Column="14" TopLine="553"/>
|
||||||
|
</Position18>
|
||||||
|
<Position19>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="1385" TopLine="1381"/>
|
||||||
|
</Position19>
|
||||||
|
<Position20>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="587" Column="15" TopLine="557"/>
|
||||||
|
</Position20>
|
||||||
|
<Position21>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="1520" Column="3" TopLine="1518"/>
|
||||||
|
</Position21>
|
||||||
|
<Position22>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="121" Column="12" TopLine="98"/>
|
||||||
|
</Position22>
|
||||||
|
<Position23>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="42" Column="15" TopLine="20"/>
|
||||||
|
</Position23>
|
||||||
|
<Position24>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="93" Column="8" TopLine="73"/>
|
||||||
|
</Position24>
|
||||||
|
<Position25>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="38" Column="14" TopLine="24"/>
|
||||||
|
</Position25>
|
||||||
|
<Position26>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="101" Column="3" TopLine="98"/>
|
||||||
|
</Position26>
|
||||||
|
<Position27>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="40" Column="15" TopLine="20"/>
|
||||||
|
</Position27>
|
||||||
|
<Position28>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="67" TopLine="56"/>
|
||||||
|
</Position28>
|
||||||
|
<Position29>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="42" Column="14" TopLine="24"/>
|
||||||
|
</Position29>
|
||||||
|
<Position30>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="93" Column="12" TopLine="41"/>
|
||||||
|
</Position30>
|
||||||
|
</JumpHistory>
|
||||||
|
<RunParams>
|
||||||
|
<FormatVersion Value="2"/>
|
||||||
|
<Modes Count="0" ActiveMode=""/>
|
||||||
|
</RunParams>
|
||||||
|
</ProjectSession>
|
||||||
|
</CONFIG>
|
BIN
components/rx/trunk/demos/rxdbgrid/SelectedFont/project1.res
Normal file
BIN
components/rx/trunk/demos/rxdbgrid/SelectedFont/project1.res
Normal file
Binary file not shown.
434
components/rx/trunk/demos/rxdbgrid/SelectedFont/unit1.lfm
Normal file
434
components/rx/trunk/demos/rxdbgrid/SelectedFont/unit1.lfm
Normal file
@@ -0,0 +1,434 @@
|
|||||||
|
object Form1: TForm1
|
||||||
|
Left = 469
|
||||||
|
Height = 537
|
||||||
|
Top = 245
|
||||||
|
Width = 898
|
||||||
|
Caption = 'RxDBGrid demo - SelectedFont'
|
||||||
|
ClientHeight = 537
|
||||||
|
ClientWidth = 898
|
||||||
|
OnCreate = FormCreate
|
||||||
|
Position = poScreenCenter
|
||||||
|
LCLVersion = '1.9.0.0'
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 698
|
||||||
|
Height = 537
|
||||||
|
Top = 0
|
||||||
|
Width = 200
|
||||||
|
Align = alRight
|
||||||
|
ClientHeight = 537
|
||||||
|
ClientWidth = 200
|
||||||
|
TabOrder = 0
|
||||||
|
object Label1: TLabel
|
||||||
|
AnchorSideLeft.Control = Panel1
|
||||||
|
AnchorSideTop.Control = ColorBox1
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 7
|
||||||
|
Height = 20
|
||||||
|
Top = 105
|
||||||
|
Width = 87
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Selected font'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object CheckBox1: TCheckBox
|
||||||
|
AnchorSideLeft.Control = Panel1
|
||||||
|
AnchorSideTop.Control = Panel1
|
||||||
|
Left = 7
|
||||||
|
Height = 24
|
||||||
|
Top = 7
|
||||||
|
Width = 97
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Row select'
|
||||||
|
OnChange = CheckBox1Change
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
AnchorSideLeft.Control = Panel1
|
||||||
|
AnchorSideBottom.Control = SpinEdit1
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 7
|
||||||
|
Height = 20
|
||||||
|
Top = 217
|
||||||
|
Width = 58
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
|
BorderSpacing.Left = 6
|
||||||
|
Caption = 'Font size'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
AnchorSideLeft.Control = Panel1
|
||||||
|
AnchorSideTop.Control = CheckBox1
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 7
|
||||||
|
Height = 20
|
||||||
|
Top = 37
|
||||||
|
Width = 93
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Selected color'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object ColorBox1: TColorBox
|
||||||
|
AnchorSideLeft.Control = Label3
|
||||||
|
AnchorSideTop.Control = Label3
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = Panel1
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 13
|
||||||
|
Height = 36
|
||||||
|
Top = 63
|
||||||
|
Width = 180
|
||||||
|
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeDefault, cbCustomColor, cbPrettyNames, cbCustomColors]
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
ItemHeight = 0
|
||||||
|
OnChange = CheckBox1Change
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
AnchorSideLeft.Control = Panel1
|
||||||
|
AnchorSideTop.Control = Label1
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 7
|
||||||
|
Height = 20
|
||||||
|
Top = 131
|
||||||
|
Width = 68
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Font name'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object EditButton1: TEditButton
|
||||||
|
AnchorSideLeft.Control = Label4
|
||||||
|
AnchorSideTop.Control = Label4
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = Panel1
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 13
|
||||||
|
Height = 37
|
||||||
|
Top = 157
|
||||||
|
Width = 180
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
ButtonWidth = 23
|
||||||
|
Glyph.Data = {
|
||||||
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
|
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00E69B6266E69A61FFE5975EFFE2945BFFE3935AFFE3915733FFFF
|
||||||
|
FF00E38F5499E28D53FFE28C51FFE28A50FFE28A50FFE28A5099FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00E79F6611E79C6477E8A573FFDB915FFEDC905DA9E5945B10FFFF
|
||||||
|
FF00E3915722E3905677E59A68FFEAAD83FFE4945EFFE28A5044FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00E79E6666E5A575FFDD9868FFDA905E2DFFFF
|
||||||
|
FF00FFFFFF00FFFFFF00E39057FFE9A77AFFE28D54CCFFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E7A16888E1A579FFDC9462F5DB91
|
||||||
|
61BDDA905EBDD88D5BBDDF9A6CFFE9A779FFE39056BBFFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E9A36A11E6A169E3E3AA80FFDC95
|
||||||
|
64ADDB946203FFFFFF00E5975DFFE9A676FFE3935A99FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E9A56D33E5A472FFDF9B
|
||||||
|
68FAE59C6653E79C6477E9A673FFE8A572FFE5955D77FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00419149E539853FFF317A37FF2A702FFF86864AFBE4AA
|
||||||
|
7CFFDF9C69D1E7A16879EAAA79FFE9A876FFE69A6177FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00419149F99BD2A2FF95D09DFF2A702FF8E7A6
|
||||||
|
70DBE2A16DF9E29F6ABAEDB487FFE9A672FFE79C6444FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF0051A75A8A71B67AFFA6D8ADFF9ED3A5FF317A37FCEAAA
|
||||||
|
7322E5A670FAE3A26FFCEEBC95FFEAA975FFE7A16844FFFFFF00DB7423DDD970
|
||||||
|
1EFFD86B1BCC84A052CA80C588FFB0DCB6FF75B87CFF419149F539853FFBE5A9
|
||||||
|
76E7E5A874F4EABB92FFE9BA93FFE7B489FFE09E6CE8FFFFFF00E49555FFDB77
|
||||||
|
25EEDB701F778CA453F288CB90FF83C68BFF619F52BF499C5203419149E1E6AC
|
||||||
|
788AE5AA7791E7A976D4E6A974E2E5A671E2E2A27094FFFFFF00E18E42FFDF7E
|
||||||
|
2EEEDB792733DB74235592AA5DFF85A151F958B16203FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E28B3A55DF85
|
||||||
|
35DDE18C41FFDD7B2ACCE7A36CFFDE813AFFD86C1B44FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E2904022E28D
|
||||||
|
3CBBE1873977DF843177DF7E2ECCE49859FFDB742388FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E6954722E698
|
||||||
|
4EFFE28E40DDE28B3A11DF853588E69F60FFDD7B2ABBFFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E697
|
||||||
|
4755E49445DDE39344FFE69A52FFE28E43FFDF843188FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
|
||||||
|
}
|
||||||
|
MaxLength = 0
|
||||||
|
NumGlyphs = 1
|
||||||
|
OnButtonClick = EditButton1ButtonClick
|
||||||
|
PasswordChar = #0
|
||||||
|
Spacing = 0
|
||||||
|
TabOrder = 2
|
||||||
|
Text = 'EditButton1'
|
||||||
|
end
|
||||||
|
object SpinEdit1: TSpinEdit
|
||||||
|
AnchorSideLeft.Control = Label2
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = EditButton1
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 71
|
||||||
|
Height = 37
|
||||||
|
Top = 200
|
||||||
|
Width = 89
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
OnChange = CheckBox1Change
|
||||||
|
TabOrder = 3
|
||||||
|
Value = 1
|
||||||
|
end
|
||||||
|
object CheckBox2: TCheckBox
|
||||||
|
AnchorSideLeft.Control = Panel1
|
||||||
|
AnchorSideTop.Control = SpinEdit1
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 7
|
||||||
|
Height = 24
|
||||||
|
Top = 243
|
||||||
|
Width = 55
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Bold'
|
||||||
|
OnChange = CheckBox1Change
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object CheckBox3: TCheckBox
|
||||||
|
AnchorSideLeft.Control = Panel1
|
||||||
|
AnchorSideTop.Control = CheckBox2
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 7
|
||||||
|
Height = 24
|
||||||
|
Top = 273
|
||||||
|
Width = 56
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Italic'
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object CheckBox4: TCheckBox
|
||||||
|
AnchorSideLeft.Control = Panel1
|
||||||
|
AnchorSideTop.Control = CheckBox3
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 7
|
||||||
|
Height = 24
|
||||||
|
Top = 303
|
||||||
|
Width = 88
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Underline'
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
object CheckBox5: TCheckBox
|
||||||
|
AnchorSideLeft.Control = Panel1
|
||||||
|
AnchorSideTop.Control = CheckBox4
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 7
|
||||||
|
Height = 24
|
||||||
|
Top = 333
|
||||||
|
Width = 87
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'StrikeOut'
|
||||||
|
OnChange = CheckBox1Change
|
||||||
|
TabOrder = 7
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
AnchorSideLeft.Control = Panel1
|
||||||
|
AnchorSideTop.Control = CheckBox5
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 7
|
||||||
|
Height = 20
|
||||||
|
Top = 363
|
||||||
|
Width = 65
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Font color'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object ColorBox2: TColorBox
|
||||||
|
AnchorSideLeft.Control = Label3
|
||||||
|
AnchorSideTop.Control = Label5
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = Panel1
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 13
|
||||||
|
Height = 36
|
||||||
|
Top = 389
|
||||||
|
Width = 180
|
||||||
|
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeDefault, cbCustomColor, cbPrettyNames, cbCustomColors]
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
ItemHeight = 0
|
||||||
|
OnChange = CheckBox1Change
|
||||||
|
TabOrder = 8
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object RxDBGrid1: TRxDBGrid
|
||||||
|
Left = 0
|
||||||
|
Height = 537
|
||||||
|
Top = 0
|
||||||
|
Width = 698
|
||||||
|
ColumnDefValues.BlobText = '(данные)'
|
||||||
|
TitleButtons = False
|
||||||
|
AutoSort = True
|
||||||
|
Columns = <
|
||||||
|
item
|
||||||
|
Title.Alignment = taCenter
|
||||||
|
Title.Orientation = toHorizontal
|
||||||
|
Title.Caption = 'ID'
|
||||||
|
Width = 60
|
||||||
|
FieldName = 'ID'
|
||||||
|
EditButtons = <>
|
||||||
|
Filter.DropDownRows = 0
|
||||||
|
Filter.EmptyValue = '(Пусто)'
|
||||||
|
Filter.NotEmptyValue = '(Не пусто)'
|
||||||
|
Filter.AllValue = '(Все значения)'
|
||||||
|
Filter.EmptyFont.Style = [fsItalic]
|
||||||
|
Filter.ItemIndex = -1
|
||||||
|
Footers = <>
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Title.Alignment = taCenter
|
||||||
|
Title.Orientation = toHorizontal
|
||||||
|
Title.Caption = 'Caption'
|
||||||
|
Width = 450
|
||||||
|
FieldName = 'Caption'
|
||||||
|
EditButtons = <>
|
||||||
|
Filter.DropDownRows = 0
|
||||||
|
Filter.EmptyValue = '(Пусто)'
|
||||||
|
Filter.NotEmptyValue = '(Не пусто)'
|
||||||
|
Filter.AllValue = '(Все значения)'
|
||||||
|
Filter.EmptyFont.Style = [fsItalic]
|
||||||
|
Filter.ItemIndex = -1
|
||||||
|
Footers = <>
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Title.Alignment = taCenter
|
||||||
|
Title.Orientation = toHorizontal
|
||||||
|
Title.Caption = 'EditDate'
|
||||||
|
Width = 150
|
||||||
|
FieldName = 'EditDate'
|
||||||
|
EditButtons = <>
|
||||||
|
Filter.DropDownRows = 0
|
||||||
|
Filter.EmptyValue = '(Пусто)'
|
||||||
|
Filter.NotEmptyValue = '(Не пусто)'
|
||||||
|
Filter.AllValue = '(Все значения)'
|
||||||
|
Filter.EmptyFont.Style = [fsItalic]
|
||||||
|
Filter.ItemIndex = -1
|
||||||
|
Footers = <>
|
||||||
|
end>
|
||||||
|
KeyStrokes = <
|
||||||
|
item
|
||||||
|
Command = rxgcShowFindDlg
|
||||||
|
ShortCut = 16454
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcShowColumnsDlg
|
||||||
|
ShortCut = 16471
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcShowFilterDlg
|
||||||
|
ShortCut = 16468
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcShowSortDlg
|
||||||
|
ShortCut = 16467
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcShowQuickFilter
|
||||||
|
ShortCut = 16465
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcHideQuickFilter
|
||||||
|
ShortCut = 16456
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcSelectAll
|
||||||
|
ShortCut = 16449
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcDeSelectAll
|
||||||
|
ShortCut = 16429
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcInvertSelection
|
||||||
|
ShortCut = 16426
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcOptimizeColumnsWidth
|
||||||
|
ShortCut = 16427
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcCopyCellValue
|
||||||
|
ShortCut = 16451
|
||||||
|
Enabled = True
|
||||||
|
end>
|
||||||
|
FooterOptions.DrawFullLine = False
|
||||||
|
SearchOptions.QuickSearchOptions = [loCaseInsensitive, loPartialKey]
|
||||||
|
SearchOptions.FromStart = False
|
||||||
|
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgAllowQuickFilter]
|
||||||
|
Align = alClient
|
||||||
|
Color = clWindow
|
||||||
|
DrawFullLine = False
|
||||||
|
FocusColor = clRed
|
||||||
|
SelectedColor = clHighlight
|
||||||
|
GridLineStyle = psSolid
|
||||||
|
DataSource = dsData
|
||||||
|
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object rxData: TRxMemoryData
|
||||||
|
FieldDefs = <
|
||||||
|
item
|
||||||
|
Name = 'ID'
|
||||||
|
DataType = ftInteger
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Name = 'Caption'
|
||||||
|
DataType = ftString
|
||||||
|
Size = 250
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Name = 'EditDate'
|
||||||
|
DataType = ftDateTime
|
||||||
|
end>
|
||||||
|
PacketRecords = 0
|
||||||
|
Left = 224
|
||||||
|
Top = 80
|
||||||
|
object rxDataID: TLongintField
|
||||||
|
FieldKind = fkData
|
||||||
|
FieldName = 'ID'
|
||||||
|
Index = 0
|
||||||
|
LookupCache = False
|
||||||
|
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||||
|
ReadOnly = False
|
||||||
|
Required = False
|
||||||
|
end
|
||||||
|
object rxDataCaption: TStringField
|
||||||
|
FieldKind = fkData
|
||||||
|
FieldName = 'Caption'
|
||||||
|
Index = 1
|
||||||
|
LookupCache = False
|
||||||
|
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||||
|
ReadOnly = False
|
||||||
|
Required = False
|
||||||
|
Size = 250
|
||||||
|
end
|
||||||
|
object rxDataEditDate: TDateTimeField
|
||||||
|
FieldKind = fkData
|
||||||
|
FieldName = 'EditDate'
|
||||||
|
Index = 2
|
||||||
|
LookupCache = False
|
||||||
|
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||||
|
ReadOnly = False
|
||||||
|
Required = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object dsData: TDataSource
|
||||||
|
DataSet = rxData
|
||||||
|
Left = 184
|
||||||
|
Top = 80
|
||||||
|
end
|
||||||
|
object FontDialog1: TFontDialog
|
||||||
|
Width = 459
|
||||||
|
Height = 359
|
||||||
|
MinFontSize = 0
|
||||||
|
MaxFontSize = 0
|
||||||
|
Left = 784
|
||||||
|
Top = 136
|
||||||
|
end
|
||||||
|
end
|
144
components/rx/trunk/demos/rxdbgrid/SelectedFont/unit1.pas
Normal file
144
components/rx/trunk/demos/rxdbgrid/SelectedFont/unit1.pas
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
unit Unit1;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, db,
|
||||||
|
DBGrids, ColorBox, EditBtn, Spin, rxmemds, rxdbgrid, rxtooledit;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
{ TForm1 }
|
||||||
|
|
||||||
|
TForm1 = class(TForm)
|
||||||
|
CheckBox1: TCheckBox;
|
||||||
|
CheckBox2: TCheckBox;
|
||||||
|
CheckBox3: TCheckBox;
|
||||||
|
CheckBox4: TCheckBox;
|
||||||
|
CheckBox5: TCheckBox;
|
||||||
|
ColorBox1: TColorBox;
|
||||||
|
ColorBox2: TColorBox;
|
||||||
|
dsData: TDataSource;
|
||||||
|
EditButton1: TEditButton;
|
||||||
|
FontDialog1: TFontDialog;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
Panel1: TPanel;
|
||||||
|
rxData: TRxMemoryData;
|
||||||
|
rxDataCaption: TStringField;
|
||||||
|
rxDataEditDate: TDateTimeField;
|
||||||
|
rxDataID: TLongintField;
|
||||||
|
RxDBGrid1: TRxDBGrid;
|
||||||
|
SpinEdit1: TSpinEdit;
|
||||||
|
procedure CheckBox1Change(Sender: TObject);
|
||||||
|
procedure EditButton1ButtonClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure LoadFontParams;
|
||||||
|
public
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
Form1: TForm1;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses math;
|
||||||
|
|
||||||
|
{$R *.lfm}
|
||||||
|
|
||||||
|
{ TForm1 }
|
||||||
|
|
||||||
|
procedure TForm1.FormCreate(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
rxData.Open;
|
||||||
|
for i:=1 to 12 do
|
||||||
|
rxData.AppendRecord([i, 'Line '+IntToStr(i) + ' ('+DefaultFormatSettings.LongMonthNames[i] +')', RandomRange(1, 100000) + Random]);
|
||||||
|
rxData.First;
|
||||||
|
|
||||||
|
LoadFontParams;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.LoadFontParams;
|
||||||
|
begin
|
||||||
|
SpinEdit1.OnChange:=nil;
|
||||||
|
CheckBox2.OnChange:=nil;
|
||||||
|
CheckBox3.OnChange:=nil;
|
||||||
|
CheckBox4.OnChange:=nil;
|
||||||
|
CheckBox5.OnChange:=nil;
|
||||||
|
ColorBox1.OnChange:=nil;
|
||||||
|
ColorBox2.OnChange:=nil;
|
||||||
|
|
||||||
|
EditButton1.Text:=RxDBGrid1.SelectedFont.Name;
|
||||||
|
SpinEdit1.Value:=RxDBGrid1.SelectedFont.Size;
|
||||||
|
CheckBox2.Checked:=fsBold in RxDBGrid1.SelectedFont.Style;
|
||||||
|
CheckBox3.Checked:=fsItalic in RxDBGrid1.SelectedFont.Style;
|
||||||
|
CheckBox4.Checked:=fsUnderline in RxDBGrid1.SelectedFont.Style;
|
||||||
|
CheckBox5.Checked:=fsStrikeOut in RxDBGrid1.SelectedFont.Style;
|
||||||
|
ColorBox2.Selected:=RxDBGrid1.SelectedFont.Color;
|
||||||
|
ColorBox1.Selected:=RxDBGrid1.SelectedColor;
|
||||||
|
|
||||||
|
SpinEdit1.OnChange:=@CheckBox1Change;
|
||||||
|
CheckBox2.OnChange:=@CheckBox1Change;
|
||||||
|
CheckBox3.OnChange:=@CheckBox1Change;
|
||||||
|
CheckBox4.OnChange:=@CheckBox1Change;
|
||||||
|
CheckBox5.OnChange:=@CheckBox1Change;
|
||||||
|
ColorBox1.OnChange:=@CheckBox1Change;
|
||||||
|
ColorBox2.OnChange:=@CheckBox1Change;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.CheckBox1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CheckBox1.Checked then
|
||||||
|
RxDBGrid1.Options:=RxDBGrid1.Options + [dgRowSelect]
|
||||||
|
else
|
||||||
|
RxDBGrid1.Options:=RxDBGrid1.Options - [dgRowSelect];
|
||||||
|
|
||||||
|
RxDBGrid1.SelectedColor:=ColorBox1.Selected;
|
||||||
|
|
||||||
|
if CheckBox2.Checked then
|
||||||
|
RxDBGrid1.SelectedFont.Style:=RxDBGrid1.SelectedFont.Style + [fsBold]
|
||||||
|
else
|
||||||
|
RxDBGrid1.SelectedFont.Style:=RxDBGrid1.SelectedFont.Style - [fsBold];
|
||||||
|
|
||||||
|
if CheckBox3.Checked then
|
||||||
|
RxDBGrid1.SelectedFont.Style:=RxDBGrid1.SelectedFont.Style + [fsItalic]
|
||||||
|
else
|
||||||
|
RxDBGrid1.SelectedFont.Style:=RxDBGrid1.SelectedFont.Style - [fsItalic];
|
||||||
|
|
||||||
|
if CheckBox4.Checked then
|
||||||
|
RxDBGrid1.SelectedFont.Style:=RxDBGrid1.SelectedFont.Style + [fsUnderline]
|
||||||
|
else
|
||||||
|
RxDBGrid1.SelectedFont.Style:=RxDBGrid1.SelectedFont.Style - [fsUnderline];
|
||||||
|
|
||||||
|
if CheckBox5.Checked then
|
||||||
|
RxDBGrid1.SelectedFont.Style:=RxDBGrid1.SelectedFont.Style + [fsStrikeOut]
|
||||||
|
else
|
||||||
|
RxDBGrid1.SelectedFont.Style:=RxDBGrid1.SelectedFont.Style - [fsStrikeOut];
|
||||||
|
|
||||||
|
RxDBGrid1.SelectedFont.Color:=ColorBox2.Selected;
|
||||||
|
RxDBGrid1.SelectedFont.Size:=SpinEdit1.Value;
|
||||||
|
|
||||||
|
|
||||||
|
LoadFontParams;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.EditButton1ButtonClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FontDialog1.Font:=RxDBGrid1.SelectedFont;
|
||||||
|
if FontDialog1.Execute then
|
||||||
|
begin
|
||||||
|
RxDBGrid1.SelectedFont:=FontDialog1.Font;
|
||||||
|
LoadFontParams;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
@@ -388,6 +388,8 @@ type
|
|||||||
|
|
||||||
TRxColumnFilter = class(TPersistent)
|
TRxColumnFilter = class(TPersistent)
|
||||||
private
|
private
|
||||||
|
FIsFontStored:Boolean;
|
||||||
|
FIsEmptyFontStored:Boolean;
|
||||||
FAllValue: string;
|
FAllValue: string;
|
||||||
FCurrentValues: TStringList;
|
FCurrentValues: TStringList;
|
||||||
FEnabled: boolean;
|
FEnabled: boolean;
|
||||||
@@ -405,7 +407,11 @@ type
|
|||||||
FColor: TColor;
|
FColor: TColor;
|
||||||
function GetDisplayFilterValue: string;
|
function GetDisplayFilterValue: string;
|
||||||
function GetItemIndex: integer;
|
function GetItemIndex: integer;
|
||||||
|
function IsEmptyFontStored: Boolean;
|
||||||
|
function IsFontStored: Boolean;
|
||||||
|
procedure FontChanged(Sender: TObject);
|
||||||
procedure SetColor(const AValue: TColor);
|
procedure SetColor(const AValue: TColor);
|
||||||
|
procedure SetEmptyFont(AValue: TFont);
|
||||||
procedure SetFont(const AValue: TFont);
|
procedure SetFont(const AValue: TFont);
|
||||||
procedure SetItemIndex(const AValue: integer);
|
procedure SetItemIndex(const AValue: integer);
|
||||||
public
|
public
|
||||||
@@ -418,7 +424,7 @@ type
|
|||||||
property ManulEditValue : string read FManulEditValue write FManulEditValue;
|
property ManulEditValue : string read FManulEditValue write FManulEditValue;
|
||||||
property DisplayFilterValue:string read GetDisplayFilterValue;
|
property DisplayFilterValue:string read GetDisplayFilterValue;
|
||||||
published
|
published
|
||||||
property Font: TFont read FFont write SetFont;
|
property Font: TFont read FFont write SetFont stored IsFontStored;
|
||||||
property Alignment: TAlignment read FAlignment write FAlignment default
|
property Alignment: TAlignment read FAlignment write FAlignment default
|
||||||
taLeftJustify;
|
taLeftJustify;
|
||||||
property DropDownRows: integer read FDropDownRows write FDropDownRows;
|
property DropDownRows: integer read FDropDownRows write FDropDownRows;
|
||||||
@@ -427,7 +433,7 @@ type
|
|||||||
property EmptyValue: string read FEmptyValue write FEmptyValue;
|
property EmptyValue: string read FEmptyValue write FEmptyValue;
|
||||||
property NotEmptyValue: string read FNotEmptyValue write FNotEmptyValue;
|
property NotEmptyValue: string read FNotEmptyValue write FNotEmptyValue;
|
||||||
property AllValue: string read FAllValue write FAllValue;
|
property AllValue: string read FAllValue write FAllValue;
|
||||||
property EmptyFont: TFont read FEmptyFont write FEmptyFont;
|
property EmptyFont: TFont read FEmptyFont write SetEmptyFont stored IsEmptyFontStored;
|
||||||
property ItemIndex: integer read GetItemIndex write SetItemIndex;
|
property ItemIndex: integer read GetItemIndex write SetItemIndex;
|
||||||
property Enabled:boolean read FEnabled write FEnabled default true;
|
property Enabled:boolean read FEnabled write FEnabled default true;
|
||||||
property Style : TRxFilterStyle read FStyle write FStyle default rxfstSimple;
|
property Style : TRxFilterStyle read FStyle write FStyle default rxfstSimple;
|
||||||
@@ -740,10 +746,12 @@ type
|
|||||||
TRxDBGrid = class(TCustomDBGrid)
|
TRxDBGrid = class(TCustomDBGrid)
|
||||||
private
|
private
|
||||||
FColumnDefValues: TRxDBGridColumnDefValues;
|
FColumnDefValues: TRxDBGridColumnDefValues;
|
||||||
|
FIsSelectedDefaultFont:boolean;
|
||||||
|
|
||||||
FFooterOptions: TRxDBGridFooterOptions;
|
FFooterOptions: TRxDBGridFooterOptions;
|
||||||
FOnCalcRowHeight: TRxDBGridCalcRowHeight;
|
FOnCalcRowHeight: TRxDBGridCalcRowHeight;
|
||||||
FSearchOptions: TRxDBGridSearchOptions;
|
FSearchOptions: TRxDBGridSearchOptions;
|
||||||
|
FSelectedFont: TFont;
|
||||||
FSortColumns: TRxDbGridColumnsSortList;
|
FSortColumns: TRxDbGridColumnsSortList;
|
||||||
FSortingNow:Boolean;
|
FSortingNow:Boolean;
|
||||||
FInProcessCalc: integer;
|
FInProcessCalc: integer;
|
||||||
@@ -817,6 +825,8 @@ type
|
|||||||
function GetTitleButtons: boolean;
|
function GetTitleButtons: boolean;
|
||||||
function IsColumnsStored: boolean;
|
function IsColumnsStored: boolean;
|
||||||
|
|
||||||
|
procedure SelectedFontChanged(Sender: TObject);
|
||||||
|
function IsSelectedFontStored: Boolean;
|
||||||
procedure SetAutoSort(const AValue: boolean);
|
procedure SetAutoSort(const AValue: boolean);
|
||||||
procedure SetColumnDefValues(AValue: TRxDBGridColumnDefValues);
|
procedure SetColumnDefValues(AValue: TRxDBGridColumnDefValues);
|
||||||
procedure SetColumns(const AValue: TRxDbGridColumns);
|
procedure SetColumns(const AValue: TRxDbGridColumns);
|
||||||
@@ -827,6 +837,7 @@ type
|
|||||||
procedure SetOptionsRx(const AValue: TOptionsRx);
|
procedure SetOptionsRx(const AValue: TOptionsRx);
|
||||||
procedure SetPropertyStorage(const AValue: TCustomPropertyStorage);
|
procedure SetPropertyStorage(const AValue: TCustomPropertyStorage);
|
||||||
procedure SetSearchOptions(AValue: TRxDBGridSearchOptions);
|
procedure SetSearchOptions(AValue: TRxDBGridSearchOptions);
|
||||||
|
procedure SetSelectedFont(AValue: TFont);
|
||||||
procedure SetTitleButtons(const AValue: boolean);
|
procedure SetTitleButtons(const AValue: boolean);
|
||||||
procedure TrackButton(X, Y: integer);
|
procedure TrackButton(X, Y: integer);
|
||||||
function GetDrawFullLine: boolean;
|
function GetDrawFullLine: boolean;
|
||||||
@@ -834,6 +845,7 @@ type
|
|||||||
procedure StopTracking;
|
procedure StopTracking;
|
||||||
procedure CalcTitle;
|
procedure CalcTitle;
|
||||||
procedure ClearMLCaptionPointers;
|
procedure ClearMLCaptionPointers;
|
||||||
|
procedure FillDefaultFonts;
|
||||||
function getFilterRect(bRect: TRect): TRect;
|
function getFilterRect(bRect: TRect): TRect;
|
||||||
function getTitleRect(bRect: TRect): TRect;
|
function getTitleRect(bRect: TRect): TRect;
|
||||||
procedure OutCaptionCellText(aCol, aRow: integer; const aRect: TRect;
|
procedure OutCaptionCellText(aCol, aRow: integer; const aRect: TRect;
|
||||||
@@ -1017,6 +1029,7 @@ type
|
|||||||
property FooterOptions:TRxDBGridFooterOptions read FFooterOptions write SetFooterOptions;
|
property FooterOptions:TRxDBGridFooterOptions read FFooterOptions write SetFooterOptions;
|
||||||
property SearchOptions:TRxDBGridSearchOptions read FSearchOptions write SetSearchOptions;
|
property SearchOptions:TRxDBGridSearchOptions read FSearchOptions write SetSearchOptions;
|
||||||
property OnCalcRowHeight:TRxDBGridCalcRowHeight read FOnCalcRowHeight write FOnCalcRowHeight;
|
property OnCalcRowHeight:TRxDBGridCalcRowHeight read FOnCalcRowHeight write FOnCalcRowHeight;
|
||||||
|
property SelectedFont:TFont read FSelectedFont write SetSelectedFont stored IsSelectedFontStored;
|
||||||
|
|
||||||
//storage
|
//storage
|
||||||
property PropertyStorage: TCustomPropertyStorage read GetPropertyStorage write SetPropertyStorage;
|
property PropertyStorage: TCustomPropertyStorage read GetPropertyStorage write SetPropertyStorage;
|
||||||
@@ -1316,7 +1329,7 @@ end;
|
|||||||
|
|
||||||
procedure TRxColumnGroupParam.FontChanged(Sender: TObject);
|
procedure TRxColumnGroupParam.FontChanged(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
FisDefaultFont := False;
|
FisDefaultFont := FFont.IsDefault;
|
||||||
FColumn.ColumnChanged;
|
FColumn.ColumnChanged;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -1828,7 +1841,7 @@ end;
|
|||||||
|
|
||||||
procedure TRxColumnFooterItem.FontChanged(Sender: TObject);
|
procedure TRxColumnFooterItem.FontChanged(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
FisDefaultFont := False;
|
FisDefaultFont := Font.IsDefault;
|
||||||
FOwner.ColumnChanged;
|
FOwner.ColumnChanged;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -3173,6 +3186,17 @@ begin
|
|||||||
Result := TRxDbGridColumns(TCustomDrawGrid(Self).Columns).Enabled;
|
Result := TRxDbGridColumns(TCustomDrawGrid(Self).Columns).Enabled;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TRxDBGrid.SelectedFontChanged(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FIsSelectedDefaultFont:=FSelectedFont.IsDefault;
|
||||||
|
VisualChange;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TRxDBGrid.IsSelectedFontStored: Boolean;
|
||||||
|
begin
|
||||||
|
Result:=not FIsSelectedDefaultFont
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TRxDBGrid.SetColumns(const AValue: TRxDbGridColumns);
|
procedure TRxDBGrid.SetColumns(const AValue: TRxDbGridColumns);
|
||||||
begin
|
begin
|
||||||
inherited Columns := TDBGridColumns(AValue);
|
inherited Columns := TDBGridColumns(AValue);
|
||||||
@@ -3245,6 +3269,12 @@ begin
|
|||||||
FSearchOptions.Assign(AValue);
|
FSearchOptions.Assign(AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TRxDBGrid.SetSelectedFont(AValue: TFont);
|
||||||
|
begin
|
||||||
|
if not FSelectedFont.IsEqual(AValue) then
|
||||||
|
FSelectedFont.Assign(AValue);
|
||||||
|
end;
|
||||||
|
|
||||||
function TRxDBGrid.DatalinkActive: boolean;
|
function TRxDBGrid.DatalinkActive: boolean;
|
||||||
begin
|
begin
|
||||||
Result := Assigned(DataSource) and Assigned(DataSource.DataSet) and
|
Result := Assigned(DataSource) and Assigned(DataSource.DataSet) and
|
||||||
@@ -3494,6 +3524,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TRxDBGrid.FillDefaultFonts;
|
||||||
|
begin
|
||||||
|
FSelectedFont.Assign(Font);
|
||||||
|
//FSelectedFont.Color:=clHighlightText;
|
||||||
|
FIsSelectedDefaultFont := True;
|
||||||
|
end;
|
||||||
|
|
||||||
function TRxDBGrid.getFilterRect(bRect: TRect): TRect;
|
function TRxDBGrid.getFilterRect(bRect: TRect): TRect;
|
||||||
begin
|
begin
|
||||||
Result := bRect;
|
Result := bRect;
|
||||||
@@ -6612,6 +6649,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxDBGrid.PrepareCanvas(aCol, aRow: Integer; AState: TGridDrawState);
|
procedure TRxDBGrid.PrepareCanvas(aCol, aRow: Integer; AState: TGridDrawState);
|
||||||
|
function IsCellButtonColumn(ACell: TPoint): boolean;
|
||||||
|
var
|
||||||
|
Column: TGridColumn;
|
||||||
|
begin
|
||||||
|
Column := ColumnFromGridColumn(ACell.X);
|
||||||
|
result := (Column<>nil) and (Column.ButtonStyle=cbsButtonColumn) and
|
||||||
|
(ACell.y>=FixedRows);
|
||||||
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
L, R, RR: Integer;
|
L, R, RR: Integer;
|
||||||
C: TRxColumn;
|
C: TRxColumn;
|
||||||
@@ -6622,6 +6668,18 @@ begin
|
|||||||
if (aCol >= L) and (aCol <= R) then
|
if (aCol >= L) and (aCol <= R) then
|
||||||
AState := AState + [gdSelected, gdFocused];
|
AState := AState + [gdSelected, gdFocused];
|
||||||
inherited PrepareCanvas(aCol, aRow, AState);
|
inherited PrepareCanvas(aCol, aRow, AState);
|
||||||
|
|
||||||
|
|
||||||
|
if (gdSelected in AState) then
|
||||||
|
begin
|
||||||
|
if not IsCellButtonColumn(point(aCol,aRow)) then
|
||||||
|
if not FIsSelectedDefaultFont then
|
||||||
|
begin
|
||||||
|
Canvas.Font:=FSelectedFont;
|
||||||
|
if FSelectedFont.Color = clDefault then
|
||||||
|
Canvas.Font.Color := clHighlightText;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF DEVELOPER_RX}
|
{$IFDEF DEVELOPER_RX}
|
||||||
@@ -6948,6 +7006,9 @@ begin
|
|||||||
FRxDbGridDateEditor.Name := 'RxDbGridDateEditor';
|
FRxDbGridDateEditor.Name := 'RxDbGridDateEditor';
|
||||||
FRxDbGridDateEditor.Visible := False;
|
FRxDbGridDateEditor.Visible := False;
|
||||||
|
|
||||||
|
FSelectedFont:=TFont.Create;
|
||||||
|
FSelectedFont.OnChange:=@SelectedFontChanged;
|
||||||
|
FillDefaultFonts;
|
||||||
UpdateJMenuKeys;
|
UpdateJMenuKeys;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
@@ -6955,6 +7016,7 @@ end;
|
|||||||
destructor TRxDBGrid.Destroy;
|
destructor TRxDBGrid.Destroy;
|
||||||
begin
|
begin
|
||||||
CleanDSEvent;
|
CleanDSEvent;
|
||||||
|
FreeAndNil(FSelectedFont);
|
||||||
FreeAndNil(FFilterSimpleEdit);
|
FreeAndNil(FFilterSimpleEdit);
|
||||||
FreeAndNil(FFooterOptions);
|
FreeAndNil(FFooterOptions);
|
||||||
FreeAndNil(FRxDbGridLookupComboEditor);
|
FreeAndNil(FRxDbGridLookupComboEditor);
|
||||||
@@ -7366,6 +7428,25 @@ begin
|
|||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TRxColumnFilter.IsEmptyFontStored: Boolean;
|
||||||
|
begin
|
||||||
|
Result:=FIsEmptyFontStored;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TRxColumnFilter.IsFontStored: Boolean;
|
||||||
|
begin
|
||||||
|
Result:=FIsFontStored;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TRxColumnFilter.FontChanged(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Sender = FFont then
|
||||||
|
FIsFontStored:=not FFont.IsDefault
|
||||||
|
else
|
||||||
|
FIsEmptyFontStored:=not FEmptyFont.IsDefault;
|
||||||
|
FOwner.ColumnChanged;
|
||||||
|
end;
|
||||||
|
|
||||||
function TRxColumnFilter.GetDisplayFilterValue: string;
|
function TRxColumnFilter.GetDisplayFilterValue: string;
|
||||||
begin
|
begin
|
||||||
Result:='';
|
Result:='';
|
||||||
@@ -7397,10 +7478,16 @@ begin
|
|||||||
FOwner.ColumnChanged;
|
FOwner.ColumnChanged;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TRxColumnFilter.SetEmptyFont(AValue: TFont);
|
||||||
|
begin
|
||||||
|
if not FEmptyFont.IsEqual(AValue) then
|
||||||
|
FEmptyFont.Assign(AValue);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TRxColumnFilter.SetFont(const AValue: TFont);
|
procedure TRxColumnFilter.SetFont(const AValue: TFont);
|
||||||
begin
|
begin
|
||||||
|
if not FFont.IsEqual(AValue) then
|
||||||
FFont.Assign(AValue);
|
FFont.Assign(AValue);
|
||||||
FOwner.ColumnChanged;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxColumnFilter.SetItemIndex(const AValue: integer);
|
procedure TRxColumnFilter.SetItemIndex(const AValue: integer);
|
||||||
@@ -7419,8 +7506,12 @@ constructor TRxColumnFilter.Create(Owner: TRxColumn);
|
|||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
FOwner := Owner;
|
FOwner := Owner;
|
||||||
|
|
||||||
FFont := TFont.Create;
|
FFont := TFont.Create;
|
||||||
|
FFont.OnChange:=@FontChanged;
|
||||||
FEmptyFont := TFont.Create;
|
FEmptyFont := TFont.Create;
|
||||||
|
FEmptyFont.OnChange:=@FontChanged;
|
||||||
|
|
||||||
FValueList := TStringList.Create;
|
FValueList := TStringList.Create;
|
||||||
FValueList.Sorted := True;
|
FValueList.Sorted := True;
|
||||||
FCurrentValues:=TStringList.Create;
|
FCurrentValues:=TStringList.Create;
|
||||||
|
@@ -23,9 +23,9 @@
|
|||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Description Value="Delphi VCL Extensions (RX)
|
<Description Value="Delphi VCL Extensions (RX)
|
||||||
Copyright (c) 1998 Master-Bank
|
Copyright (c) 1998 Master-Bank
|
||||||
translate to Lazarus by alexs in 2005 - 2017"/>
|
translate to Lazarus by alexs in 2005 - 2018"/>
|
||||||
<License Value="LGPL"/>
|
<License Value="LGPL"/>
|
||||||
<Version Major="3" Minor="1" Release="1" Build="210"/>
|
<Version Major="3" Minor="2" Release="1" Build="210"/>
|
||||||
<Files Count="72">
|
<Files Count="72">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="registerrx.pas"/>
|
<Filename Value="registerrx.pas"/>
|
||||||
@@ -316,7 +316,7 @@ translate to Lazarus by alexs in 2005 - 2017"/>
|
|||||||
</Item71>
|
</Item71>
|
||||||
<Item72>
|
<Item72>
|
||||||
<Filename Value="rxcontrols\rxrangesel.pas"/>
|
<Filename Value="rxcontrols\rxrangesel.pas"/>
|
||||||
<UnitName Value="rxrangesel"/>
|
<UnitName Value="RxRangeSel"/>
|
||||||
</Item72>
|
</Item72>
|
||||||
</Files>
|
</Files>
|
||||||
<LazDoc Paths="docs;\usr\local\share\lazarus\components\rxnew\docs"/>
|
<LazDoc Paths="docs;\usr\local\share\lazarus\components\rxnew\docs"/>
|
||||||
|
Reference in New Issue
Block a user