You've already forked lazarus-ccr
RxFPC: RXDBGrid export to PDF component
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5082 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
BIN
components/rx/trunk/Demos/RxDbGridExportToPDF/project1.ico
Normal file
BIN
components/rx/trunk/Demos/RxDbGridExportToPDF/project1.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 134 KiB |
83
components/rx/trunk/Demos/RxDbGridExportToPDF/project1.lpi
Normal file
83
components/rx/trunk/Demos/RxDbGridExportToPDF/project1.lpi
Normal file
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="project1"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</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>
|
||||
22
components/rx/trunk/Demos/RxDbGridExportToPDF/project1.lpr
Normal file
22
components/rx/trunk/Demos/RxDbGridExportToPDF/project1.lpr
Normal file
@@ -0,0 +1,22 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, rxnew, Unit1,
|
||||
sysutils;
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource:=True;
|
||||
DefaultFormatSettings.ThousandSeparator:=' ';
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
||||
622
components/rx/trunk/Demos/RxDbGridExportToPDF/project1.lps
Normal file
622
components/rx/trunk/Demos/RxDbGridExportToPDF/project1.lps
Normal file
@@ -0,0 +1,622 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectSession>
|
||||
<Version Value="9"/>
|
||||
<BuildModes Active="Default"/>
|
||||
<Units Count="61">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<CursorPos X="81" Y="12"/>
|
||||
<UsageCount Value="59"/>
|
||||
</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="59"/>
|
||||
<CursorPos X="34" Y="61"/>
|
||||
<UsageCount Value="59"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<UnitName Value="RxDBGridExportSpreadSheet"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="143"/>
|
||||
<CursorPos X="31" Y="32"/>
|
||||
<UsageCount Value="16"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="2312"/>
|
||||
<CursorPos X="30" Y="2329"/>
|
||||
<UsageCount Value="24"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="rxdbgridexportpdf.pas"/>
|
||||
<UnitName Value="RxDBGridExportPdf"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="51"/>
|
||||
<CursorPos X="69" Y="76"/>
|
||||
<UsageCount Value="17"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="../../rxdconst.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="161"/>
|
||||
<CursorPos X="18" Y="177"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="../../../install/source/fpcsrc/rtl/objpas/classes/reader.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="964"/>
|
||||
<CursorPos Y="986"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="../../../OPTORG/alexs/3/examples/testfppdf.lpr"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="107"/>
|
||||
<CursorPos Y="133"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="../../../install/source/fpcsrc/packages/fcl-pdf/src/fppdf.pp"/>
|
||||
<UnitName Value="fpPDF"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="530"/>
|
||||
<CursorPos X="15" Y="544"/>
|
||||
<UsageCount Value="25"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="../../registerrxdb.pas"/>
|
||||
<UnitName Value="RegisterRxDB"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<CursorPos X="23" Y="10"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||
<UnitName Value="RxDBGridExportPdf"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="548"/>
|
||||
<CursorPos X="19" Y="515"/>
|
||||
<UsageCount Value="27"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="3" Y="361" ID="1"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="../../rxdbgridprintgrid.pas"/>
|
||||
<UnitName Value="RxDBGridPrintGrid"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="140"/>
|
||||
<CursorPos X="3" Y="145"/>
|
||||
<UsageCount Value="17"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="../../../OPTORG/alexs/1/1/testfppdf.lpr"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="145"/>
|
||||
<CursorPos X="13" Y="166"/>
|
||||
<UsageCount Value="21"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
<Filename Value="../../../install/source/fpcsrc/packages/fcl-pdf/src/fpparsettf.pp"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="344"/>
|
||||
<CursorPos Y="365"/>
|
||||
<UsageCount Value="13"/>
|
||||
</Unit13>
|
||||
<Unit14>
|
||||
<Filename Value="../../../install/source/fpcsrc/rtl/objpas/sysutils/sysutilh.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="97"/>
|
||||
<CursorPos X="19" Y="112"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit14>
|
||||
<Unit15>
|
||||
<Filename Value="../../../install/source/fpcsrc/packages/fcl-pdf/src/fpttfencodings.pp"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="2025"/>
|
||||
<CursorPos X="3" Y="2100"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
<Filename Value="../../../lazutils/lazfreetypefontcollection.pas"/>
|
||||
<UnitName Value="LazFreeTypeFontCollection"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="345"/>
|
||||
<CursorPos X="3" Y="347"/>
|
||||
<UsageCount Value="21"/>
|
||||
</Unit16>
|
||||
<Unit17>
|
||||
<Filename Value="../../../lazutils/easylazfreetype.pas"/>
|
||||
<UnitName Value="EasyLazFreeType"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1563"/>
|
||||
<CursorPos X="3" Y="1550"/>
|
||||
<UsageCount Value="21"/>
|
||||
</Unit17>
|
||||
<Unit18>
|
||||
<Filename Value="../../../../examples/lazfreetype/mainform.pas"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="51"/>
|
||||
<CursorPos X="78" Y="61"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit18>
|
||||
<Unit19>
|
||||
<Filename Value="../../../lazutils/ttfile.pas"/>
|
||||
<UnitName Value="TTFile"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="233"/>
|
||||
<CursorPos Y="249"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit19>
|
||||
<Unit20>
|
||||
<Filename Value="../../../install/source/fpcsrc/rtl/objpas/sysutils/finah.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="10"/>
|
||||
<CursorPos X="10" Y="25"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit20>
|
||||
<Unit21>
|
||||
<Filename Value="../../../install/source/fpcsrc/rtl/objpas/sysutils/fina.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="100"/>
|
||||
<CursorPos X="3" Y="105"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit21>
|
||||
<Unit22>
|
||||
<Filename Value="../../../install/source/fpcsrc/rtl/inc/fexpand.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="226"/>
|
||||
<CursorPos X="10" Y="106"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit22>
|
||||
<Unit23>
|
||||
<Filename Value="../../../tachart/tadraweropengl.pas"/>
|
||||
<UnitName Value="TADrawerOpenGL"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="218"/>
|
||||
<CursorPos Y="220"/>
|
||||
<UsageCount Value="13"/>
|
||||
</Unit23>
|
||||
<Unit24>
|
||||
<Filename Value="../../../lazutils/fileutil.pas"/>
|
||||
<UnitName Value="FileUtil"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<CursorPos X="14" Y="22"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit24>
|
||||
<Unit25>
|
||||
<Filename Value="../../../lazutils/fileutil.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1013"/>
|
||||
<CursorPos Y="1031"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit25>
|
||||
<Unit26>
|
||||
<Filename Value="../../../lazutils/lazfileutils.pas"/>
|
||||
<UnitName Value="LazFileUtils"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="719"/>
|
||||
<CursorPos Y="736"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit26>
|
||||
<Unit27>
|
||||
<Filename Value="../../../tachart/backup/tadraweropengl.pas"/>
|
||||
<UnitName Value="TADrawerOpenGL"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="208"/>
|
||||
<CursorPos X="20" Y="224"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit27>
|
||||
<Unit28>
|
||||
<Filename Value="unit1.lfm"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="231"/>
|
||||
<UsageCount Value="8"/>
|
||||
<DefaultSyntaxHighlighter Value="LFM"/>
|
||||
</Unit28>
|
||||
<Unit29>
|
||||
<Filename Value="../../../lazreport/source/lr_class.pas"/>
|
||||
<UnitName Value="LR_Class"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="3503"/>
|
||||
<CursorPos X="3" Y="3506"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit29>
|
||||
<Unit30>
|
||||
<Filename Value="C:/lazarus/components/lazutils/easylazfreetype.pas"/>
|
||||
<UnitName Value="EasyLazFreeType"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<CursorPos X="14" Y="160"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit30>
|
||||
<Unit31>
|
||||
<Filename Value="C:/lazarus/components/lazutils/lazfreetypefontcollection.pas"/>
|
||||
<UnitName Value="LazFreeTypeFontCollection"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="127"/>
|
||||
<CursorPos X="50" Y="141"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit31>
|
||||
<Unit32>
|
||||
<Filename Value="../../../install/source/fpcsrc/rtl/objpas/classes/classesh.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="76"/>
|
||||
<CursorPos X="56" Y="91"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit32>
|
||||
<Unit33>
|
||||
<Filename Value="../../../install/source/fpcsrc/rtl/objpas/sysutils/sysinth.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="122"/>
|
||||
<CursorPos X="58" Y="137"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit33>
|
||||
<Unit34>
|
||||
<Filename Value="../../vclutils.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="125"/>
|
||||
<CursorPos Y="155"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit34>
|
||||
<Unit35>
|
||||
<Filename Value="../../rxshortcutunit.pas"/>
|
||||
<ComponentName Value="rxShortCutForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="rxShortCutUnit"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="13"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit35>
|
||||
<Unit36>
|
||||
<Filename Value="../../rxctrls.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="40"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit36>
|
||||
<Unit37>
|
||||
<Filename Value="../../rxapputils.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="28"/>
|
||||
<CursorPos X="83" Y="64"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit37>
|
||||
<Unit38>
|
||||
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/sqldb/sqldb.pp"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="439"/>
|
||||
<CursorPos X="3" Y="454"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit38>
|
||||
<Unit39>
|
||||
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/base/db.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1339"/>
|
||||
<CursorPos X="3" Y="1354"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit39>
|
||||
<Unit40>
|
||||
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/base/dataset.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="473"/>
|
||||
<CursorPos X="3" Y="476"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit40>
|
||||
<Unit41>
|
||||
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/base/bufdataset.pas"/>
|
||||
<UnitName Value="BufDataset"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="458"/>
|
||||
<CursorPos X="3" Y="446"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="3" Y="3449" ID="1"/>
|
||||
</Bookmarks>
|
||||
</Unit41>
|
||||
<Unit42>
|
||||
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/base/bufdataset_parser.pp"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<CursorPos X="20" Y="18"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit42>
|
||||
<Unit43>
|
||||
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/dbase/dbf_prscore.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="34"/>
|
||||
<CursorPos X="3" Y="43"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit43>
|
||||
<Unit44>
|
||||
<Filename Value="../../rxmemds.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="25"/>
|
||||
<CursorPos X="47" Y="40"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="33" Y="131" ID="2"/>
|
||||
</Bookmarks>
|
||||
</Unit44>
|
||||
<Unit45>
|
||||
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/memds/memds.pp"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="136"/>
|
||||
<CursorPos X="14" Y="155"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit45>
|
||||
<Unit46>
|
||||
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/dbase/dbf.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="2336"/>
|
||||
<CursorPos X="3" Y="2338"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit46>
|
||||
<Unit47>
|
||||
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/dbase/dbf_parser.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="162"/>
|
||||
<CursorPos X="5" Y="87"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit47>
|
||||
<Unit48>
|
||||
<Filename Value="../../rxdb/rxmemds_parser.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="186"/>
|
||||
<CursorPos X="3" Y="189"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit48>
|
||||
<Unit49>
|
||||
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/dbase/dbf_common.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="95"/>
|
||||
<CursorPos X="10" Y="110"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit49>
|
||||
<Unit50>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<UnitName Value="Grids"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1972"/>
|
||||
<CursorPos X="21" Y="1976"/>
|
||||
<UsageCount Value="12"/>
|
||||
</Unit50>
|
||||
<Unit51>
|
||||
<Filename Value="../../../lazutils/lazfreetype.pas"/>
|
||||
<UnitName Value="LazFreeType"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="76"/>
|
||||
<CursorPos Y="76"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit51>
|
||||
<Unit52>
|
||||
<Filename Value="../../../lazutils/ttobjs.pas"/>
|
||||
<UnitName Value="TTObjs"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit52>
|
||||
<Unit53>
|
||||
<Filename Value="../../../lazutils/tttables.pas"/>
|
||||
<UnitName Value="TTTables"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit53>
|
||||
<Unit54>
|
||||
<Filename Value="../../../../lcl/dbgrids.pas"/>
|
||||
<UnitName Value="DBGrids"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="4071"/>
|
||||
<CursorPos Y="4090"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit54>
|
||||
<Unit55>
|
||||
<Filename Value="../../../../lcl/graphics.pp"/>
|
||||
<UnitName Value="Graphics"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1959"/>
|
||||
<CursorPos X="29" Y="1970"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit55>
|
||||
<Unit56>
|
||||
<Filename Value="../../../../lcl/lcltype.pp"/>
|
||||
<UnitName Value="LCLType"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1629"/>
|
||||
<CursorPos X="3" Y="1644"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit56>
|
||||
<Unit57>
|
||||
<Filename Value="../../../install/source/fpcsrc/packages/fcl-image/src/fpimage.pp"/>
|
||||
<UnitName Value="FPimage"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="37"/>
|
||||
<CursorPos X="4" Y="45"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit57>
|
||||
<Unit58>
|
||||
<Filename Value="../../rxdbgridexportpdfsetupunit.pas"/>
|
||||
<ComponentName Value="RxDBGridExportPdfSetupForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="RxDBGridExportPdfSetupUnit"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<TopLine Value="56"/>
|
||||
<CursorPos X="5" Y="83"/>
|
||||
<UsageCount Value="20"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit58>
|
||||
<Unit59>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet_paramsunit.pas"/>
|
||||
<ComponentName Value="RxDBGridExportSpreadSheet_ParamsForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="RxDBGridExportSpreadSheet_ParamsUnit"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="31"/>
|
||||
<CursorPos X="3" Y="46"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit59>
|
||||
<Unit60>
|
||||
<Filename Value="../../../../lcl/controls.pp"/>
|
||||
<UnitName Value="Controls"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="5"/>
|
||||
<CursorPos X="14" Y="19"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit60>
|
||||
</Units>
|
||||
<JumpHistory Count="27" HistoryIndex="26">
|
||||
<Position1>
|
||||
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||
<Caret Line="277" Column="53" TopLine="252"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||
<Caret Line="142" Column="15" TopLine="127"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||
<Caret Line="275" Column="70" TopLine="261"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||
<Caret Line="285" TopLine="226"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||
<Caret Line="239" Column="61" TopLine="236"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||
<Caret Line="208" Column="20" TopLine="203"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="../../rxdbgridexportpdfsetupunit.pas"/>
|
||||
<Caret Line="18" Column="30"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||
<Caret Line="136" Column="89" TopLine="129"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||
<Caret Line="477" Column="34" TopLine="457"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../rxdbgridexportpdfsetupunit.pas"/>
|
||||
<Caret Line="67" TopLine="39"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="../../rxdbgridexportpdfsetupunit.pas"/>
|
||||
<Caret Line="83" TopLine="53"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="../../rxdbgridexportpdfsetupunit.pas"/>
|
||||
<Caret Line="82" Column="5" TopLine="56"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="166" Column="3" TopLine="148"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="165" Column="3" TopLine="147"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="164" Column="3" TopLine="146"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="167" Column="54" TopLine="146"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="unit1.pas"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="157" Column="44" TopLine="127"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="156" Column="44" TopLine="126"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="137" Column="65" TopLine="127"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="10" Column="22" TopLine="166"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="150" TopLine="161"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="188" TopLine="164"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="155" TopLine="139"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="156" TopLine="139"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="157" TopLine="139"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="164" Column="42" TopLine="153"/>
|
||||
</Position27>
|
||||
</JumpHistory>
|
||||
</ProjectSession>
|
||||
<Debugging>
|
||||
<BreakPoints Count="1">
|
||||
<Item1>
|
||||
<Kind Value="bpkSource"/>
|
||||
<WatchScope Value="wpsLocal"/>
|
||||
<WatchKind Value="wpkWrite"/>
|
||||
<Source Value="../../../lazutils/lazfreetypefontcollection.pas"/>
|
||||
<Line Value="423"/>
|
||||
</Item1>
|
||||
</BreakPoints>
|
||||
<Watches Count="4">
|
||||
<Item1>
|
||||
<Expression Value="fName"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Expression Value="C"/>
|
||||
<DisplayStyle Value="wdfHex"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Expression Value="A"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<Expression Value="Result"/>
|
||||
<DisplayStyle Value="wdfHex"/>
|
||||
</Item4>
|
||||
</Watches>
|
||||
</Debugging>
|
||||
</CONFIG>
|
||||
BIN
components/rx/trunk/Demos/RxDbGridExportToPDF/project1.res
Normal file
BIN
components/rx/trunk/Demos/RxDbGridExportToPDF/project1.res
Normal file
Binary file not shown.
355
components/rx/trunk/Demos/RxDbGridExportToPDF/unit1.lfm
Normal file
355
components/rx/trunk/Demos/RxDbGridExportToPDF/unit1.lfm
Normal file
@@ -0,0 +1,355 @@
|
||||
object Form1: TForm1
|
||||
Left = 558
|
||||
Height = 397
|
||||
Top = 319
|
||||
Width = 1043
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 397
|
||||
ClientWidth = 1043
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.7'
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 50
|
||||
Top = 347
|
||||
Width = 1043
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
ClientHeight = 50
|
||||
ClientWidth = 1043
|
||||
TabOrder = 0
|
||||
object Button1: TButton
|
||||
AnchorSideLeft.Control = Panel1
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
AnchorSideTop.Control = Panel1
|
||||
Left = 476
|
||||
Height = 36
|
||||
Top = 7
|
||||
Width = 90
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Create PDF'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 0
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
Left = 1
|
||||
Height = 24
|
||||
Top = 18
|
||||
Width = 99
|
||||
Caption = 'CheckBox1'
|
||||
OnChange = CheckBox1Change
|
||||
TabOrder = 1
|
||||
end
|
||||
object Edit1: TEdit
|
||||
Left = 137
|
||||
Height = 37
|
||||
Top = 7
|
||||
Width = 295
|
||||
TabOrder = 2
|
||||
Text = 'ID=1'
|
||||
end
|
||||
end
|
||||
object PageControl1: TPageControl
|
||||
Left = 0
|
||||
Height = 347
|
||||
Top = 0
|
||||
Width = 1043
|
||||
ActivePage = TabSheet1
|
||||
Align = alClient
|
||||
TabIndex = 0
|
||||
TabOrder = 1
|
||||
object TabSheet1: TTabSheet
|
||||
Caption = 'Test data'
|
||||
ClientHeight = 313
|
||||
ClientWidth = 1033
|
||||
object RxDBGrid1: TRxDBGrid
|
||||
Left = 0
|
||||
Height = 313
|
||||
Top = 0
|
||||
Width = 1033
|
||||
ColumnDefValues.BlobText = '(данные)'
|
||||
TitleButtons = False
|
||||
AutoSort = True
|
||||
Columns = <
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'ID'
|
||||
Width = 50
|
||||
FieldName = 'ID'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Color = clCream
|
||||
Font.Color = clPurple
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'Наименование продукта'
|
||||
Width = 364
|
||||
FieldName = 'NAME'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Color = clYellow
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'Дата поставки'
|
||||
Width = 90
|
||||
FieldName = 'PDATE'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'Сумма'
|
||||
Width = 100
|
||||
FieldName = 'SUM'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'Страна'
|
||||
Width = 200
|
||||
FieldName = 'Country'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'Город'
|
||||
Width = 200
|
||||
FieldName = 'Sity'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
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
|
||||
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgAllowQuickFilter, rdgAllowToolMenu]
|
||||
Align = alClient
|
||||
Color = clWindow
|
||||
DrawFullLine = False
|
||||
FocusColor = clRed
|
||||
SelectedColor = clHighlight
|
||||
GridLineStyle = psSolid
|
||||
DataSource = DataSource1
|
||||
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
|
||||
ParentColor = False
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object TabSheet2: TTabSheet
|
||||
Caption = 'Debug window'
|
||||
ClientHeight = 313
|
||||
ClientWidth = 1033
|
||||
object Memo1: TMemo
|
||||
Left = 0
|
||||
Height = 313
|
||||
Top = 0
|
||||
Width = 1033
|
||||
Align = alClient
|
||||
Lines.Strings = (
|
||||
'Memo1'
|
||||
)
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
object RxMemoryData1: TRxMemoryData
|
||||
FieldDefs = <
|
||||
item
|
||||
Name = 'ID'
|
||||
DataType = ftAutoInc
|
||||
end
|
||||
item
|
||||
Name = 'NAME'
|
||||
DataType = ftString
|
||||
Size = 220
|
||||
end
|
||||
item
|
||||
Name = 'PDATE'
|
||||
DataType = ftDate
|
||||
end
|
||||
item
|
||||
Name = 'SUM'
|
||||
DataType = ftCurrency
|
||||
end
|
||||
item
|
||||
Name = 'Country'
|
||||
DataType = ftString
|
||||
Size = 100
|
||||
end
|
||||
item
|
||||
Name = 'Sity'
|
||||
DataType = ftString
|
||||
Size = 100
|
||||
end>
|
||||
PacketRecords = 0
|
||||
left = 136
|
||||
top = 88
|
||||
object RxMemoryData1ID: TAutoIncField
|
||||
FieldKind = fkData
|
||||
FieldName = 'ID'
|
||||
Index = 0
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
end
|
||||
object RxMemoryData1NAME: TStringField
|
||||
FieldKind = fkData
|
||||
FieldName = 'NAME'
|
||||
Index = 1
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
Size = 220
|
||||
end
|
||||
object RxMemoryData1PDATE: TDateField
|
||||
FieldKind = fkData
|
||||
FieldName = 'PDATE'
|
||||
Index = 2
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
end
|
||||
object RxMemoryData1SUM: TCurrencyField
|
||||
FieldKind = fkData
|
||||
FieldName = 'SUM'
|
||||
Index = 3
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
MaxValue = 0
|
||||
MinValue = 0
|
||||
Precision = 2
|
||||
end
|
||||
object RxMemoryData1Country: TStringField
|
||||
FieldKind = fkData
|
||||
FieldName = 'Country'
|
||||
Index = 4
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
Size = 100
|
||||
end
|
||||
object RxMemoryData1Sity: TStringField
|
||||
FieldKind = fkData
|
||||
FieldName = 'Sity'
|
||||
Index = 5
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
Size = 100
|
||||
end
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = RxMemoryData1
|
||||
left = 104
|
||||
top = 88
|
||||
end
|
||||
object RxDBGridExportPDF1: TRxDBGridExportPDF
|
||||
RxDBGrid = RxDBGrid1
|
||||
Caption = 'Export to PDF file'
|
||||
ShowSetupForm = True
|
||||
FileName = 'test111.pdf'
|
||||
Options = [repExportTitle, repExportColors, repExportFooter]
|
||||
PdfOptions.Options = []
|
||||
OpenAfterExport = True
|
||||
AuthorPdf = 'Лагунов А.А.'
|
||||
ProducerPdf = 'alexs'
|
||||
left = 112
|
||||
top = 160
|
||||
end
|
||||
end
|
||||
230
components/rx/trunk/Demos/RxDbGridExportToPDF/unit1.pas
Normal file
230
components/rx/trunk/Demos/RxDbGridExportToPDF/unit1.pas
Normal file
@@ -0,0 +1,230 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, rxmemds, rxdbgrid,
|
||||
RxDBGridExportPdf, Forms, Controls, Graphics,
|
||||
Dialogs, ExtCtrls, StdCtrls, ComCtrls, db;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Button1: TButton;
|
||||
CheckBox1: TCheckBox;
|
||||
DataSource1: TDataSource;
|
||||
Edit1: TEdit;
|
||||
Memo1: TMemo;
|
||||
PageControl1: TPageControl;
|
||||
Panel1: TPanel;
|
||||
RxDBGrid1: TRxDBGrid;
|
||||
RxDBGridExportPDF1: TRxDBGridExportPDF;
|
||||
RxMemoryData1: TRxMemoryData;
|
||||
RxMemoryData1Country: TStringField;
|
||||
RxMemoryData1ID: TAutoIncField;
|
||||
RxMemoryData1NAME: TStringField;
|
||||
RxMemoryData1PDATE: TDateField;
|
||||
RxMemoryData1Sity: TStringField;
|
||||
RxMemoryData1SUM: TCurrencyField;
|
||||
TabSheet1: TTabSheet;
|
||||
TabSheet2: TTabSheet;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure CheckBox1Change(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
FontDirList: TStrings;
|
||||
procedure InitFonts;
|
||||
procedure ShowInfo(AText:string; AParams : array of const);
|
||||
procedure DebugFonts;
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
uses EasyLazFreeType, LazFreeTypeFontCollection,
|
||||
LazFileUtils;
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
PageControl1.ActivePageIndex:=0;
|
||||
RxMemoryData1.Open;
|
||||
RxMemoryData1.AppendRecord([1, 'Строка с длинным текстом 1', now, 100, 'Россия', 'Москва']);
|
||||
RxMemoryData1.AppendRecord([2, 'Строка с длинным текстом 2', now - 1, 100, 'Россия', 'Ставрополь']);
|
||||
RxMemoryData1.AppendRecord([3, 'Строка с длинным текстом 3', now - 2, 110, 'Россия', 'Калининград']);
|
||||
RxMemoryData1.AppendRecord([4, 'Строка с длинным текстом 4', now - 3, 5000, 'Россия', 'Владивасток']);
|
||||
RxMemoryData1.AppendRecord([5, 'Строка с длинным текстом 5', now - 4, 123.31, 'USA', 'New-York']);
|
||||
RxMemoryData1.AppendRecord([6, 'Строка с длинным текстом 6', now, 100, 'Россия', 'Москва']);
|
||||
RxMemoryData1.AppendRecord([7, 'Строка с длинным текстом 7', now - 1, 100, 'Россия', 'Ставрополь']);
|
||||
RxMemoryData1.AppendRecord([8, 'Строка с длинным текстом 8', now - 2, 110, 'Россия', 'Калининград']);
|
||||
RxMemoryData1.AppendRecord([9, 'Строка с длинным текстом 9', now - 3, 5000, 'Россия', 'Владивасток']);
|
||||
RxMemoryData1.AppendRecord([10,'Строка с длинным текстом 10', now - 4, 123.31, 'USA', 'New-York']);
|
||||
RxMemoryData1.AppendRecord([11,'Строка с длинным текстом 11', now, 100, 'Россия', 'Москва']);
|
||||
RxMemoryData1.AppendRecord([12,'Строка с длинным текстом 12', now - 1, 100, 'Россия', 'Ставрополь']);
|
||||
RxMemoryData1.AppendRecord([13,'Строка с длинным текстом 13', now - 2, 110, 'Россия', 'Калининград']);
|
||||
RxMemoryData1.AppendRecord([14,'Строка с длинным текстом 14', now - 3, 5000, 'Россия', 'Владивасток']);
|
||||
RxMemoryData1.AppendRecord([15,'Строка с длинным текстом 15', now - 4, 123.31, 'USA', 'New-York']);
|
||||
RxMemoryData1.AppendRecord([16,'Строка с длинным текстом 16', now, 100, 'Россия', 'Москва']);
|
||||
RxMemoryData1.AppendRecord([17,'Строка с длинным текстом 17', now - 1, 100, 'Россия', 'Ставрополь']);
|
||||
RxMemoryData1.AppendRecord([18,'Строка с длинным текстом 18', now - 2, 110, 'Россия', 'Калининград']);
|
||||
RxMemoryData1.AppendRecord([19,'Строка с длинным текстом 19', now - 3, 5000, 'Россия', 'Владивасток']);
|
||||
RxMemoryData1.AppendRecord([20,'Строка с длинным текстом 20', now - 4, 123.31, 'USA', 'New-York']);
|
||||
|
||||
DebugFonts;
|
||||
end;
|
||||
|
||||
procedure TForm1.InitFonts;
|
||||
procedure CreateFontDirList;
|
||||
var
|
||||
s: String;
|
||||
begin
|
||||
FontDirList := TStringList.Create;
|
||||
{$IFDEF WINDOWS}
|
||||
s := SHGetFolderPathUTF8(20); // CSIDL_FONTS = 20
|
||||
if s <> '' then
|
||||
FontDirList.Add(s);
|
||||
{$ENDIF}
|
||||
{$IFDEF linux}
|
||||
FontDirList.Add('/usr/share/cups/fonts/');
|
||||
FontDirList.Add('/usr/share/fonts/');
|
||||
FontDirList.Add('/usr/local/lib/X11/fonts/');
|
||||
FontDirList.Add(GetUserDir + '.fonts/');
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
|
||||
{ Duplicates functionality in FontCollection.AddFolder in order to be able to
|
||||
ignore exceptions due to font read errors (occur on Linux Mint with font
|
||||
NanumMyeongjo.ttf }
|
||||
procedure AddFolder(AFolder: string);
|
||||
var
|
||||
files: TStringList;
|
||||
i: integer;
|
||||
begin
|
||||
AFolder := ExpandFileName(AFolder);
|
||||
if (length(AFolder) <> 0) and (AFolder[length(AFolder)] <> PathDelim) then
|
||||
AFolder += PathDelim;
|
||||
files := TStringList.Create;
|
||||
FontCollection.BeginUpdate;
|
||||
try
|
||||
FindAllFiles(files, AFolder, '*.ttf', true);
|
||||
files.Sort;
|
||||
for i := 0 to files.Count-1 do
|
||||
try
|
||||
FontCollection.AddFile(files[i]);
|
||||
except
|
||||
end;
|
||||
finally
|
||||
FontCollection.EndUpdate;
|
||||
files.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
if FontDirList = nil then
|
||||
CreateFontDirList;
|
||||
|
||||
for i:=0 to FontDirList.Count-1 do
|
||||
AddFolder(FontDirList[i]);
|
||||
end;
|
||||
|
||||
procedure TForm1.ShowInfo(AText: string; AParams: array of const);
|
||||
begin
|
||||
Memo1.Lines.Add(Format(AText, AParams));
|
||||
end;
|
||||
|
||||
procedure TForm1.DebugFonts;
|
||||
|
||||
procedure DumpFamaly(AFontFamely:string);
|
||||
var
|
||||
FFM: TCustomFamilyCollectionItem;
|
||||
I: Integer;
|
||||
FFI: TCustomFontCollectionItem;
|
||||
begin
|
||||
FFM:=FontCollection.Family[AFontFamely];
|
||||
if not Assigned(FFM) then
|
||||
begin
|
||||
ShowInfo('Font Family %s NOT FOUND!', [AFontFamely]);
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
||||
ShowInfo('In Family %s count fonts : %d', [AFontFamely, FFM.FontCount]);
|
||||
for I:=0 to FFM.FontCount-1 do
|
||||
begin
|
||||
FFI:=FFM.Font[i];
|
||||
ShowInfo('Font in file %s - NAME: %s. Styles = %s', [FFI.Filename, FFI.Information[ftiFullName], FFI.Styles]);
|
||||
end;
|
||||
|
||||
FFI:=FFM.GetFont('Regular');
|
||||
if Assigned(FFI) then
|
||||
ShowInfo('REGULAR Font in file %s - NAME: %s', [FFI.Filename, FFI.Information[ftiFullName]])
|
||||
else
|
||||
ShowInfo('Regular font not found', []);
|
||||
end;
|
||||
|
||||
begin
|
||||
InitFonts;
|
||||
Memo1.Lines.Clear;
|
||||
if Assigned(FontCollection) then
|
||||
begin
|
||||
ShowInfo('FontCollection.FontFileCount = %d', [FontCollection.FontFileCount]);
|
||||
ShowInfo('FontCollection.FamilyCount = %d', [FontCollection.FamilyCount]);
|
||||
DumpFamaly('Arial');
|
||||
DumpFamaly('Sans');
|
||||
DumpFamaly('Serif');
|
||||
DumpFamaly('Liberation Sans');
|
||||
end
|
||||
else
|
||||
Memo1.Text:='FontCollection not assigned';
|
||||
end;
|
||||
|
||||
procedure TForm1.Button1Click(Sender: TObject);
|
||||
begin
|
||||
RxDBGridExportPDF1.Execute;
|
||||
end;
|
||||
|
||||
procedure TForm1.CheckBox1Change(Sender: TObject);
|
||||
begin
|
||||
if CheckBox1.Checked then
|
||||
begin
|
||||
RxMemoryData1.Filter:=Edit1.Text;
|
||||
end;
|
||||
RxMemoryData1.Filtered:=CheckBox1.Checked;
|
||||
end;
|
||||
|
||||
procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
FreeAndNil(FontDirList);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
{
|
||||
'Conakry'
|
||||
'DejaVu Sans'
|
||||
'DejaVu Sans Condensed'
|
||||
'DejaVu Sans Light'
|
||||
'DejaVu Sans Mono'
|
||||
'DejaVu Serif'
|
||||
'DejaVu Serif Condensed'
|
||||
|
||||
'Denemo'
|
||||
|
||||
'FreeSans'
|
||||
'Caladea'
|
||||
'Carlito'
|
||||
}
|
||||
Reference in New Issue
Block a user