Стартовый пул
BIN
RXLib/demos/rxdbgrid/MergeCell/project1.ico
Normal file
After Width: | Height: | Size: 134 KiB |
86
RXLib/demos/rxdbgrid/MergeCell/project1.lpi
Normal file
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="10"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="project1"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="5">
|
||||
<Item1>
|
||||
<PackageName Value="rxdbgrid_print"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="rxdbgrid_export_spreadsheet"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="FCL"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<PackageName Value="rxnew"/>
|
||||
</Item4>
|
||||
<Item5>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item5>
|
||||
</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>
|
21
RXLib/demos/rxdbgrid/MergeCell/project1.lpr
Normal file
@@ -0,0 +1,21 @@
|
||||
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
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
263
RXLib/demos/rxdbgrid/MergeCell/unit1.lfm
Normal file
@@ -0,0 +1,263 @@
|
||||
object Form1: TForm1
|
||||
Left = 574
|
||||
Height = 620
|
||||
Top = 316
|
||||
Width = 770
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 620
|
||||
ClientWidth = 770
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.9.0.0'
|
||||
object RxDBGrid1: TRxDBGrid
|
||||
Left = 0
|
||||
Height = 570
|
||||
Top = 50
|
||||
Width = 770
|
||||
ColumnDefValues.BlobText = '(данные)'
|
||||
TitleButtons = False
|
||||
AutoSort = True
|
||||
Columns = <
|
||||
item
|
||||
Alignment = taCenter
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'CODE'
|
||||
Width = 60
|
||||
FieldName = 'CODE'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Пусто)'
|
||||
Filter.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
WordWrap = True
|
||||
OnDrawColumnCell = RxDBGrid1Columns0DrawColumnCell
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'DATE'
|
||||
Width = 90
|
||||
FieldName = 'DATE'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Пусто)'
|
||||
Filter.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'NAME'
|
||||
Width = 400
|
||||
FieldName = 'NAME'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Пусто)'
|
||||
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, rdgAllowToolMenu]
|
||||
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 = 0
|
||||
OnMergeCells = RxDBGrid1MergeCells
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 50
|
||||
Top = 0
|
||||
Width = 770
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
ClientHeight = 50
|
||||
ClientWidth = 770
|
||||
TabOrder = 1
|
||||
object CheckBox1: TCheckBox
|
||||
AnchorSideLeft.Control = Panel1
|
||||
AnchorSideTop.Control = Panel1
|
||||
Left = 7
|
||||
Height = 24
|
||||
Top = 7
|
||||
Width = 108
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Col spanning'
|
||||
OnChange = CheckBox1Change
|
||||
TabOrder = 0
|
||||
end
|
||||
object Button1: TButton
|
||||
AnchorSideTop.Control = Panel1
|
||||
AnchorSideRight.Control = Panel1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 694
|
||||
Height = 36
|
||||
Top = 7
|
||||
Width = 69
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Export...'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 1
|
||||
end
|
||||
object Button2: TButton
|
||||
AnchorSideTop.Control = Panel1
|
||||
AnchorSideRight.Control = Button1
|
||||
Left = 643
|
||||
Height = 36
|
||||
Top = 7
|
||||
Width = 45
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Print'
|
||||
OnClick = Button2Click
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object rxData: TRxMemoryData
|
||||
FieldDefs = <
|
||||
item
|
||||
Name = 'CODE'
|
||||
DataType = ftInteger
|
||||
end
|
||||
item
|
||||
Name = 'DATE'
|
||||
DataType = ftDateTime
|
||||
end
|
||||
item
|
||||
Name = 'NAME'
|
||||
DataType = ftString
|
||||
Size = 150
|
||||
end>
|
||||
PacketRecords = 0
|
||||
Left = 293
|
||||
Top = 165
|
||||
object rxDataCODE: TLongintField
|
||||
FieldKind = fkData
|
||||
FieldName = 'CODE'
|
||||
Index = 0
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
end
|
||||
object rxDataDATE: TDateTimeField
|
||||
FieldKind = fkData
|
||||
FieldName = 'DATE'
|
||||
Index = 1
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
DisplayFormat = 'dd.mm.yyyy'
|
||||
end
|
||||
object rxDataNAME: TStringField
|
||||
FieldKind = fkData
|
||||
FieldName = 'NAME'
|
||||
Index = 2
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
Size = 150
|
||||
end
|
||||
end
|
||||
object dsData: TDataSource
|
||||
DataSet = rxData
|
||||
Left = 256
|
||||
Top = 165
|
||||
end
|
||||
object RxDBGridExportSpreadSheet1: TRxDBGridExportSpreadSheet
|
||||
RxDBGrid = RxDBGrid1
|
||||
Caption = 'Экспорт в электронную таблицу'
|
||||
ShowSetupForm = True
|
||||
FileName = 'aaa.ods'
|
||||
PageName = 'Test1'
|
||||
Options = [ressExportTitle, ressExportColors, ressExportFooter, ressExportFormula, ressOverwriteExisting, ressExportSelectedRows, ressHideZeroValues, ressColSpanning]
|
||||
OpenAfterExport = True
|
||||
Left = 336
|
||||
Top = 165
|
||||
end
|
||||
object RxDBGridPrint1: TRxDBGridPrint
|
||||
RxDBGrid = RxDBGrid1
|
||||
Caption = 'Печать списка'
|
||||
ShowSetupForm = True
|
||||
Options = [rxpoShowTitle, rxpoShowFooter, rxpoShowGridColor, rxpoShowFooterColor, rxpoShowReportTitle, rxpoHideZeroValues]
|
||||
ShowProgress = True
|
||||
ReportTitle = 'A'
|
||||
ShowColumnHeaderOnAllPage = True
|
||||
Left = 336
|
||||
Top = 208
|
||||
end
|
||||
end
|
110
RXLib/demos/rxdbgrid/MergeCell/unit1.pas
Normal file
@@ -0,0 +1,110 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, rxdbgrid, rxmemds, RxDBGridExportSpreadSheet,
|
||||
RxDBGridPrintGrid, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, db,
|
||||
Grids, DBGrids;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
CheckBox1: TCheckBox;
|
||||
dsData: TDataSource;
|
||||
Panel1: TPanel;
|
||||
rxDataCODE: TLongintField;
|
||||
rxDataDATE: TDateTimeField;
|
||||
rxDataNAME: TStringField;
|
||||
RxDBGrid1: TRxDBGrid;
|
||||
rxData: TRxMemoryData;
|
||||
RxDBGridExportSpreadSheet1: TRxDBGridExportSpreadSheet;
|
||||
RxDBGridPrint1: TRxDBGridPrint;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure CheckBox1Change(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure RxDBGrid1Columns0DrawColumnCell(Sender: TObject;
|
||||
const Rect: TRect; DataCol: Integer; Column: TColumn;
|
||||
State: TGridDrawState);
|
||||
procedure RxDBGrid1MergeCells(Sender: TObject; ACol: Integer; var ALeft,
|
||||
ARight: Integer; var ADisplayColumn: TRxColumn);
|
||||
private
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
rxData.Open;
|
||||
rxData.DisableControls;
|
||||
for i:=1 to 30 do
|
||||
rxData.AppendRecord([i, Date - i, 'Line '+IntToStr(i)]);
|
||||
rxData.First;
|
||||
rxData.EnableControls;
|
||||
end;
|
||||
|
||||
procedure TForm1.RxDBGrid1Columns0DrawColumnCell(Sender: TObject;
|
||||
const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);
|
||||
var
|
||||
S: String;
|
||||
FAl: TAlignment;
|
||||
begin
|
||||
S:=rxDataCODE.DisplayText;
|
||||
if CheckBox1.Checked and (rxDataCODE.AsInteger mod 10 = 1) then
|
||||
FAl:=taCenter
|
||||
else
|
||||
FAl:=taRightJustify;
|
||||
WriteTextHeader(RxDBGrid1.Canvas, Rect, S, FAl)
|
||||
end;
|
||||
|
||||
procedure TForm1.RxDBGrid1MergeCells(Sender: TObject; ACol: Integer; var ALeft,
|
||||
ARight: Integer; var ADisplayColumn: TRxColumn);
|
||||
begin
|
||||
if rxDataCODE.AsInteger mod 10 = 1 then
|
||||
begin
|
||||
ALeft:=1;
|
||||
ARight:=3;
|
||||
{ if rxDataCODE.AsInteger > 10 then
|
||||
ADisplayColumn:=RxDBGrid1.ColumnByFieldName('DATE');}
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.CheckBox1Change(Sender: TObject);
|
||||
begin
|
||||
if CheckBox1.Checked then
|
||||
RxDBGrid1.OptionsRx:=RxDBGrid1.OptionsRx + [rdgColSpanning]
|
||||
else
|
||||
RxDBGrid1.OptionsRx:=RxDBGrid1.OptionsRx - [rdgColSpanning];
|
||||
end;
|
||||
|
||||
procedure TForm1.Button1Click(Sender: TObject);
|
||||
begin
|
||||
RxDBGridExportSpreadSheet1.Execute;
|
||||
end;
|
||||
|
||||
procedure TForm1.Button2Click(Sender: TObject);
|
||||
begin
|
||||
RxDBGridPrint1.Execute;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
BIN
RXLib/demos/rxdbgrid/RxDBGrid/RxDBGridDemo.ico
Normal file
After Width: | Height: | Size: 766 B |
805
RXLib/demos/rxdbgrid/RxDBGrid/RxDBGridDemo.lpi
Normal file
@@ -0,0 +1,805 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<LRSInOutputDirectory Value="False"/>
|
||||
</Flags>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="RxDBGrid demo"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<UseVersionInfo Value="True"/>
|
||||
<AutoIncrementBuild Value="True"/>
|
||||
<MajorVersionNr Value="3"/>
|
||||
<MinorVersionNr Value="4"/>
|
||||
<RevisionNr Value="1"/>
|
||||
<BuildNr Value="1"/>
|
||||
<StringTable ProductName="Demo application from RXFPC library" LegalCopyright="Lagunov Aleksey, GPL 2" ProductVersion="3.1.1.0" FileDescription="Demo application from RXFPC library"/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IgnoreBinaries Value="False"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="1">
|
||||
<Mode0 Name="default">
|
||||
<local>
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</Mode0>
|
||||
</Modes>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="5">
|
||||
<Item1>
|
||||
<PackageName Value="rxdbgrid_export_spreadsheet"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="rxdbgrid_print"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="FCL"/>
|
||||
<MinVersion Major="1" Valid="True"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item4>
|
||||
<Item5>
|
||||
<PackageName Value="rxnew"/>
|
||||
<MinVersion Major="1" Release="18" Build="56" Valid="True"/>
|
||||
</Item5>
|
||||
</RequiredPackages>
|
||||
<Units Count="78">
|
||||
<Unit0>
|
||||
<Filename Value="RxDBGridDemo.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<CursorPos Y="17"/>
|
||||
<UsageCount Value="130"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="RxDBGridMainForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="RxDBGridMainUnit"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<TopLine Value="118"/>
|
||||
<CursorPos X="50" Y="152"/>
|
||||
<UsageCount Value="130"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="2470"/>
|
||||
<CursorPos X="72" Y="2503"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<UnitName Value="RxDBGridExportSpreadSheet"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="74"/>
|
||||
<CursorPos X="41" Y="91"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="../../rxdconst.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="100"/>
|
||||
<CursorPos X="55" Y="121"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="../../rxautopanel.pas"/>
|
||||
<UnitName Value="RxAutoPanel"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="32"/>
|
||||
<CursorPos X="74" Y="56"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="../../registerrx.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="156"/>
|
||||
<CursorPos X="47" Y="184"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="../../rxpickdate.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="246"/>
|
||||
<CursorPos Y="257"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="../../rxtooledit.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<CursorPos X="3"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="../../rxdateutil.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="16"/>
|
||||
<CursorPos X="16" Y="32"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="../../rxdbdateedit.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="97"/>
|
||||
<CursorPos X="18" Y="32"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="../../rxdbutils.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="145"/>
|
||||
<CursorPos X="53" Y="168"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="../../rxdaterangeeditunit.pas"/>
|
||||
<UnitName Value="rxDateRangeEditUnit"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="133"/>
|
||||
<CursorPos X="8" Y="150"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
<Filename Value="../../rxboxprocs.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit13>
|
||||
<Unit14>
|
||||
<Filename Value="../../rxfduallst.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="22"/>
|
||||
<CursorPos X="16" Y="32"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit14>
|
||||
<Unit15>
|
||||
<Filename Value="../../rxduallist.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="72"/>
|
||||
<CursorPos X="35" Y="91"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
<Filename Value="../../rxtbrsetup.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="74"/>
|
||||
<CursorPos X="38" Y="93"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit16>
|
||||
<Unit17>
|
||||
<Filename Value="../../rxceeditlookupfields.pas"/>
|
||||
<UnitName Value="rxceEditLookupFields"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="40"/>
|
||||
<CursorPos X="9" Y="64"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit17>
|
||||
<Unit18>
|
||||
<Filename Value="../../register_rxctrl.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="269"/>
|
||||
<CursorPos X="24" Y="301"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit18>
|
||||
<Unit19>
|
||||
<Filename Value="../../LazReport/rxlazreport.pas"/>
|
||||
<UnitName Value="RxLazReport"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<CursorPos X="90" Y="7"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit19>
|
||||
<Unit20>
|
||||
<Filename Value="../../LazReport/lrrxcontrols.pas"/>
|
||||
<UnitName Value="lrRxControls"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="122"/>
|
||||
<CursorPos X="74" Y="139"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit20>
|
||||
<Unit21>
|
||||
<Filename Value="../../rxvclutils.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit21>
|
||||
<Unit22>
|
||||
<Filename Value="../../rxctrls.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="819"/>
|
||||
<CursorPos X="27" Y="824"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit22>
|
||||
<Unit23>
|
||||
<Filename Value="../../rxtoolbar.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="272"/>
|
||||
<CursorPos X="35" Y="281"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit23>
|
||||
<Unit24>
|
||||
<Filename Value="../../rxswitch.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="136"/>
|
||||
<CursorPos X="16" Y="157"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit24>
|
||||
<Unit25>
|
||||
<Filename Value="../../rxdice.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="16"/>
|
||||
<CursorPos X="49" Y="38"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit25>
|
||||
<Unit26>
|
||||
<Filename Value="../../rxclock.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="166"/>
|
||||
<CursorPos X="16" Y="181"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit26>
|
||||
<Unit27>
|
||||
<Filename Value="../../rxspin.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="242"/>
|
||||
<CursorPos X="13" Y="245"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit27>
|
||||
<Unit28>
|
||||
<Filename Value="../../rxmdi.pas"/>
|
||||
<UnitName Value="RxMDI"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="134"/>
|
||||
<CursorPos Y="160"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit28>
|
||||
<Unit29>
|
||||
<Filename Value="../../rxpopupunit.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="233"/>
|
||||
<CursorPos X="6" Y="250"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit29>
|
||||
<Unit30>
|
||||
<Filename Value="../../rxlookup.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="13"/>
|
||||
<CursorPos X="23" Y="41"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit30>
|
||||
<Unit31>
|
||||
<Filename Value="../../rxdbctrls.pas"/>
|
||||
<UnitName Value="RxDBCtrls"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="187"/>
|
||||
<CursorPos X="29" Y="215"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit31>
|
||||
<Unit32>
|
||||
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||
<UnitName Value="RxDBGridExportPdf"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="23"/>
|
||||
<CursorPos X="38" Y="40"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit32>
|
||||
<Unit33>
|
||||
<Filename Value="../../rxlogin.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="196"/>
|
||||
<CursorPos X="47" Y="209"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit33>
|
||||
<Unit34>
|
||||
<Filename Value="../../rxdbgridprintgrid.pas"/>
|
||||
<UnitName Value="RxDBGridPrintGrid"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="22"/>
|
||||
<CursorPos X="24" Y="39"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit34>
|
||||
<Unit35>
|
||||
<Filename Value="../../rxseldsfrm.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="61"/>
|
||||
<CursorPos X="16" Y="32"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit35>
|
||||
<Unit36>
|
||||
<Filename Value="../../registerrxdb.pas"/>
|
||||
<UnitName Value="RegisterRxDB"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="149"/>
|
||||
<CursorPos X="19" Y="165"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit36>
|
||||
<Unit37>
|
||||
<Filename Value="../../rxcurredit.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="113"/>
|
||||
<CursorPos X="3" Y="130"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit37>
|
||||
<Unit38>
|
||||
<Filename Value="../../rxdbcurredit.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="25"/>
|
||||
<CursorPos X="18" Y="34"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit38>
|
||||
<Unit39>
|
||||
<Filename Value="../../rxfolderlister.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="13"/>
|
||||
<CursorPos X="20" Y="32"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit39>
|
||||
<Unit40>
|
||||
<Filename Value="../../rxpagemngr.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="26"/>
|
||||
<CursorPos X="74" Y="49"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit40>
|
||||
<Unit41>
|
||||
<Filename Value="../../rxdbgrid_findunit.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="55"/>
|
||||
<CursorPos X="8" Y="72"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit41>
|
||||
<Unit42>
|
||||
<Filename Value="../../rxdbspinedit.pas"/>
|
||||
<UnitName Value="RxDBSpinEdit"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="115"/>
|
||||
<CursorPos X="8" Y="132"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit42>
|
||||
<Unit43>
|
||||
<Filename Value="../../rxdbtimeedit.pas"/>
|
||||
<UnitName Value="RxDBTimeEdit"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="125"/>
|
||||
<CursorPos X="8" Y="142"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit43>
|
||||
<Unit44>
|
||||
<Filename Value="../../rxmemds.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="247"/>
|
||||
<CursorPos X="36" Y="264"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit44>
|
||||
<Unit45>
|
||||
<Filename Value="../../rxdbcomb.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="156"/>
|
||||
<CursorPos X="8" Y="173"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit45>
|
||||
<Unit46>
|
||||
<Filename Value="../../rxdbgridfootertools_setup.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="52"/>
|
||||
<CursorPos X="8" Y="69"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit46>
|
||||
<Unit47>
|
||||
<Filename Value="../../rxxpman.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="14"/>
|
||||
<CursorPos X="6" Y="56"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit47>
|
||||
<Unit48>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="6230"/>
|
||||
<CursorPos X="8" Y="6265"/>
|
||||
<UsageCount Value="15"/>
|
||||
</Unit48>
|
||||
<Unit49>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<UnitName Value="Grids"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="8729"/>
|
||||
<CursorPos X="3" Y="8733"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit49>
|
||||
<Unit50>
|
||||
<Filename Value="../../../../lcl/controls.pp"/>
|
||||
<UnitName Value="Controls"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="2284"/>
|
||||
<CursorPos X="15" Y="2303"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit50>
|
||||
<Unit51>
|
||||
<Filename Value="../../../../lcl/include/customcontrol.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="64"/>
|
||||
<CursorPos X="3" Y="73"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit51>
|
||||
<Unit52>
|
||||
<Filename Value="../../../../lcl/dbgrids.pas"/>
|
||||
<UnitName Value="DBGrids"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="409"/>
|
||||
<CursorPos X="15" Y="426"/>
|
||||
<UsageCount Value="12"/>
|
||||
</Unit52>
|
||||
<Unit53>
|
||||
<Filename Value="/home/install/source/fpcsrc/packages/fcl-db/src/base/db.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1652"/>
|
||||
<CursorPos X="14" Y="1665"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit53>
|
||||
<Unit54>
|
||||
<Filename Value="../../rxdb/rxdbgrid_findunit.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="13"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit54>
|
||||
<Unit55>
|
||||
<Filename Value="../../../../lcl/themes.pas"/>
|
||||
<UnitName Value="Themes"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="679"/>
|
||||
<CursorPos X="27" Y="692"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit55>
|
||||
<Unit56>
|
||||
<Filename Value="../../rx.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="23"/>
|
||||
<CursorPos Y="60"/>
|
||||
<UsageCount Value="12"/>
|
||||
</Unit56>
|
||||
<Unit57>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="1180"/>
|
||||
<CursorPos X="45" Y="1192"/>
|
||||
<UsageCount Value="12"/>
|
||||
<Bookmarks Count="2">
|
||||
<Item0 X="3" Y="7325" ID="1"/>
|
||||
<Item1 X="17" Y="4367" ID="2"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
</Unit57>
|
||||
<Unit58>
|
||||
<Filename Value="../../../rxdb/rxmemds.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1077"/>
|
||||
<CursorPos X="51" Y="1090"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit58>
|
||||
<Unit59>
|
||||
<Filename Value="/home/install/source/fpcsrc/packages/fcl-db/src/base/bufdataset_parser.pp"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="38"/>
|
||||
<CursorPos Y="39"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit59>
|
||||
<Unit60>
|
||||
<Filename Value="/home/install/source/fpcsrc/packages/fcl-db/src/base/dataset.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1452"/>
|
||||
<CursorPos X="3" Y="1457"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit60>
|
||||
<Unit61>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<ComponentName Value="RxDBGrid_PopUpFilterForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="RxDBGrid_PopUpFilterUnit"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<TopLine Value="152"/>
|
||||
<CursorPos Y="159"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit61>
|
||||
<Unit62>
|
||||
<Filename Value="../../../rxtools/rxfileutils.pas"/>
|
||||
<UnitName Value="rxFileUtils"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="183"/>
|
||||
<CursorPos Y="206"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit62>
|
||||
<Unit63>
|
||||
<Filename Value="../../../../lazutils/translations.pas"/>
|
||||
<UnitName Value="Translations"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="604"/>
|
||||
<CursorPos Y="635"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit63>
|
||||
<Unit64>
|
||||
<Filename Value="../../../rxtools/rxdconst.pas"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<TopLine Value="98"/>
|
||||
<CursorPos X="3" Y="117"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit64>
|
||||
<Unit65>
|
||||
<Filename Value="/home/install/source/fpcsrc/rtl/inc/typshrdh.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="126"/>
|
||||
<CursorPos X="17" Y="154"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit65>
|
||||
<Unit66>
|
||||
<Filename Value="/home/install/source/fpcsrc/rtl/objpas/classes/classesh.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="706"/>
|
||||
<CursorPos X="14" Y="723"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit66>
|
||||
<Unit67>
|
||||
<Filename Value="../../../../../lcl/lclproc.pas"/>
|
||||
<UnitName Value="LCLProc"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<TopLine Value="843"/>
|
||||
<CursorPos Y="862"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit67>
|
||||
<Unit68>
|
||||
<Filename Value="../../../../lazutils/laz_avl_tree.pp"/>
|
||||
<UnitName Value="Laz_AVL_Tree"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1387"/>
|
||||
<CursorPos Y="1406"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit68>
|
||||
<Unit69>
|
||||
<Filename Value="../../../../../lcl/include/customcombobox.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="200"/>
|
||||
<CursorPos Y="218"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit69>
|
||||
<Unit70>
|
||||
<Filename Value="../../../../../lcl/lclmessageglue.pas"/>
|
||||
<UnitName Value="LCLMessageGlue"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="103"/>
|
||||
<CursorPos Y="123"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit70>
|
||||
<Unit71>
|
||||
<Filename Value="../../../../../lcl/interfaces/win32/win32callback.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="2676"/>
|
||||
<CursorPos Y="2695"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit71>
|
||||
<Unit72>
|
||||
<Filename Value="../../../../../lcl/interfaces/win32/win32wsstdctrls.pp"/>
|
||||
<UnitName Value="Win32WSStdCtrls"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="412"/>
|
||||
<CursorPos Y="428"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit72>
|
||||
<Unit73>
|
||||
<Filename Value="../../../../../lcl/interfaces/win32/win32memostrings.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="167"/>
|
||||
<CursorPos X="42" Y="192"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit73>
|
||||
<Unit74>
|
||||
<Filename Value="../../../../../lcl/include/control.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="4514"/>
|
||||
<CursorPos Y="4540"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit74>
|
||||
<Unit75>
|
||||
<Filename Value="../../../rxdbgrid_print/rxdbgridprintgrid.pas"/>
|
||||
<UnitName Value="RxDBGridPrintGrid"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<TopLine Value="365"/>
|
||||
<CursorPos X="3" Y="314"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit75>
|
||||
<Unit76>
|
||||
<Filename Value="../../../rxdbgrid_export_spreadsheet/rxdbgridexportspreadsheet.pas"/>
|
||||
<UnitName Value="RxDBGridExportSpreadSheet"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<TopLine Value="40"/>
|
||||
<CursorPos X="3" Y="59"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit76>
|
||||
<Unit77>
|
||||
<Filename Value="../../../rxdb/rxlookup.pas"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<TopLine Value="34"/>
|
||||
<CursorPos X="53" Y="54"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit77>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="1182" Column="61" TopLine="1151"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="2340" Column="3" TopLine="2338"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="1182" Column="15" TopLine="1164"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="1162" Column="15" TopLine="1143"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="2341" Column="3" TopLine="2338"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="1161" Column="15" TopLine="1101"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="1269" TopLine="1241"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="3023" Column="13" TopLine="3017"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="../../../rxdb/rxlookup.pas"/>
|
||||
<Caret Line="322" Column="14" TopLine="305"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="3023" Column="26" TopLine="3017"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="1192" Column="45" TopLine="1180"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="80" Column="27" TopLine="50"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="162" TopLine="153"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="159" TopLine="152"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="160" TopLine="152"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="161" TopLine="152"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="163" TopLine="152"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="164" TopLine="152"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="166" TopLine="152"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="165" Column="2" TopLine="152"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="159" TopLine="152"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="160" TopLine="152"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="161" TopLine="152"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="166" TopLine="152"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="169" Column="4" TopLine="152"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="159" TopLine="152"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="160" TopLine="152"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="161" TopLine="152"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="166" TopLine="152"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<Target>
|
||||
<Filename Value="RxDBGridDemo"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
<SrcPath Value="$(LazarusDir)/lcl;$(LazarusDir)/lcl/interfaces/$(LCLWidgetType)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<Linking>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="2">
|
||||
<Item1>
|
||||
<Name Value="RunError(216)"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="EConvertError"/>
|
||||
</Item2>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
25
RXLib/demos/rxdbgrid/RxDBGrid/RxDBGridDemo.lpr
Normal file
@@ -0,0 +1,25 @@
|
||||
program RxDBGridDemo;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms,
|
||||
sysutils,
|
||||
RxDBGridMainUnit;
|
||||
|
||||
{$R RxDBGridDemo.res}
|
||||
|
||||
begin
|
||||
LocalizeApp;
|
||||
DefaultFormatSettings.ThousandSeparator:=' ';
|
||||
//
|
||||
Application.Title:='RxDBGrid demo';
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TRxDBGridMainForm, RxDBGridMainForm);
|
||||
Application.Run;
|
||||
end.
|
||||
|
340
RXLib/demos/rxdbgrid/RxDBGrid/docs/COPYING.GPL.txt
Normal file
@@ -0,0 +1,340 @@
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
1564
RXLib/demos/rxdbgrid/RxDBGrid/rxdbgridmainunit.lfm
Normal file
320
RXLib/demos/rxdbgrid/RxDBGrid/rxdbgridmainunit.pas
Normal file
@@ -0,0 +1,320 @@
|
||||
unit RxDBGridMainUnit;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, rxmemds,
|
||||
DB, rxdbgrid, RxAboutDialog, RxIniPropStorage, RxDBGridPrintGrid,
|
||||
RxDBGridExportSpreadSheet, RxDBGridFooterTools, rxtooledit, RxDBGridExportPdf,
|
||||
ExtCtrls, Buttons, Menus, ActnList, StdCtrls, DBGrids, Types, Grids;
|
||||
|
||||
type
|
||||
|
||||
{ TRxDBGridMainForm }
|
||||
|
||||
TRxDBGridMainForm = class(TForm)
|
||||
actCalcTotal: TAction;
|
||||
CheckBox5: TCheckBox;
|
||||
Label2: TLabel;
|
||||
MenuItem10: TMenuItem;
|
||||
MenuItem11: TMenuItem;
|
||||
MenuItem8: TMenuItem;
|
||||
MenuItem9: TMenuItem;
|
||||
RxAboutDialog1: TRxAboutDialog;
|
||||
RxDateEdit1: TRxDateEdit;
|
||||
RxDBGridExportPDF1: TRxDBGridExportPDF;
|
||||
RxDBGridExportSpreadSheet1: TRxDBGridExportSpreadSheet;
|
||||
RxDBGridFooterTools1: TRxDBGridFooterTools;
|
||||
RxDBGridPrint1: TRxDBGridPrint;
|
||||
RxIniPropStorage1: TRxIniPropStorage;
|
||||
RxMemoryData1RAIT: TStringField;
|
||||
SpeedButton1: TSpeedButton;
|
||||
sysExit: TAction;
|
||||
hlpAbout: TAction;
|
||||
CheckBox2: TCheckBox;
|
||||
CheckBox3: TCheckBox;
|
||||
CheckBox4: TCheckBox;
|
||||
ImageList1: TImageList;
|
||||
MainMenu1: TMainMenu;
|
||||
MenuItem5: TMenuItem;
|
||||
MenuItem6: TMenuItem;
|
||||
MenuItem7: TMenuItem;
|
||||
showColumnsDialog: TAction;
|
||||
showFindDialog: TAction;
|
||||
actOptimizeWidthCol1: TAction;
|
||||
actOptimizeColumnsWidthAll: TAction;
|
||||
ActionList1: TActionList;
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
CheckBox1: TCheckBox;
|
||||
ComboBox1: TComboBox;
|
||||
Datasource1: TDatasource;
|
||||
Datasource2: TDatasource;
|
||||
Label1: TLabel;
|
||||
MenuItem1: TMenuItem;
|
||||
MenuItem2: TMenuItem;
|
||||
MenuItem3: TMenuItem;
|
||||
MenuItem4: TMenuItem;
|
||||
Panel1: TPanel;
|
||||
PopupMenu1: TPopupMenu;
|
||||
RxDBGrid1: TRxDBGrid;
|
||||
RxMemoryData1: TRxMemoryData;
|
||||
RxMemoryData1Date_Present1: TDateField;
|
||||
RxMemoryData1Developer1: TStringField;
|
||||
RxMemoryData1DEVELOPER_ID1: TLongintField;
|
||||
RxMemoryData1ID1: TLongintField;
|
||||
RxMemoryData1NAME1: TStringField;
|
||||
RxMemoryData1PRICE1: TFloatField;
|
||||
RxMemoryData2: TRxMemoryData;
|
||||
RxMemoryData2DEVELOPER_ID1: TLongintField;
|
||||
RxMemoryData2DEVELOPER_NAME1: TStringField;
|
||||
Timer1: TTimer;
|
||||
procedure actCalcTotalExecute(Sender: TObject);
|
||||
procedure actOptimizeColumnsWidthAllExecute(Sender: TObject);
|
||||
procedure actOptimizeWidthCol1Execute(Sender: TObject);
|
||||
procedure CheckBox1Change(Sender: TObject);
|
||||
procedure CheckBox2Change(Sender: TObject);
|
||||
procedure CheckBox3Change(Sender: TObject);
|
||||
procedure CheckBox4Change(Sender: TObject);
|
||||
procedure CheckBox5Change(Sender: TObject);
|
||||
procedure ComboBox1Change(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure hlpAboutExecute(Sender: TObject);
|
||||
procedure RxDBGrid1DataHintShow(Sender: TObject; CursorPos: TPoint;
|
||||
Cell: TGridCoord; Column: TRxColumn; var HintStr: string;
|
||||
var Processed: boolean);
|
||||
procedure RxDBGrid1Filtred(Sender: TObject);
|
||||
procedure RxDBGrid1GetCellProps(Sender: TObject; Field: TField;
|
||||
AFont: TFont; var Background: TColor);
|
||||
procedure showColumnsDialogExecute(Sender: TObject);
|
||||
procedure showFindDialogExecute(Sender: TObject);
|
||||
procedure sysExitExecute(Sender: TObject);
|
||||
procedure Timer1Timer(Sender: TObject);
|
||||
procedure TRxColumnEditButtons0Click(Sender: TObject);
|
||||
procedure TRxColumnEditButtons1Click(Sender: TObject);
|
||||
procedure TRxColumnEditButtons2Click(Sender: TObject);
|
||||
private
|
||||
procedure DoFillFilters;
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
RxDBGridMainForm: TRxDBGridMainForm;
|
||||
|
||||
procedure LocalizeApp;
|
||||
implementation
|
||||
uses rxsortmemds, FileUtil, gettext, translations, rxFileUtils, LazFileUtils, LazUTF8;
|
||||
|
||||
procedure LocalizeApp;
|
||||
var
|
||||
Lang, FallbackLang: String;
|
||||
begin
|
||||
GetLanguageIDs(Lang{%H-},FallbackLang{%H-}); // in unit gettext
|
||||
TranslateUnitResourceStrings('rxconst',NormalizeDirectoryName('../../../languages/rxconst.%s.po'), Lang, FallbackLang);
|
||||
TranslateUnitResourceStrings('rxdconst',NormalizeDirectoryName('../../../languages/rxdconst.%s.po'), Lang, FallbackLang);
|
||||
end;
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TRxDBGridMainForm }
|
||||
|
||||
procedure TRxDBGridMainForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
RxAboutDialog1.LicenseFileName:=AppendPathDelim(AppendPathDelim(ExtractFileDir(ParamStrUTF8(0))) + 'docs')+'COPYING.GPL.txt';
|
||||
|
||||
RxMemoryData2.Open;
|
||||
RxMemoryData2.AppendRecord([1, 'Open source']);
|
||||
RxMemoryData2.AppendRecord([2, 'Borland']);
|
||||
RxMemoryData2.AppendRecord([3, 'Microsoft']);
|
||||
|
||||
RxMemoryData1.Open;
|
||||
RxMemoryData1.AppendRecord([1, 'Lazarus', 0, 'Open source', EncodeDate(2006, 1, 1), 1]);
|
||||
RxMemoryData1.AppendRecord([2, 'Delphi 7.0 Prof', 990, 'Borland', EncodeDate(2002, 1, 1), 2]);
|
||||
RxMemoryData1.AppendRecord([3, 'Open Office 2.2.0', 0, 'Open source', EncodeDate(2006, 10, 1), 1]);
|
||||
RxMemoryData1.AppendRecord([4, 'Microsoft Office', 150, 'Microsoft', EncodeDate(1997, 8, 12), 3]);
|
||||
RxMemoryData1.AppendRecord([5, 'Microsoft Windows 95', 50, 'Microsoft', EncodeDate(1995, 8, 12), 3]);
|
||||
RxMemoryData1.AppendRecord([6, 'Microsoft Windows 98', 90, 'Microsoft', EncodeDate(1997, 12, 12), 3]);
|
||||
RxMemoryData1.AppendRecord([7, 'Microsoft Windows ME', 90, 'Microsoft', EncodeDate(1999, 10, 25), 3]);
|
||||
RxMemoryData1.AppendRecord([8, 'Microsoft Windows NT 4.0', 250, 'Microsoft', EncodeDate(1996, 2, 3), 3]);
|
||||
RxMemoryData1.AppendRecord([9, 'Microsoft Windows 2000', 150, 'Microsoft', EncodeDate(1999, 11, 13), 3]);
|
||||
RxMemoryData1.AppendRecord([10, 'Microsoft Windows XP', 130, 'Microsoft', EncodeDate(2003, 10, 1), 3]);
|
||||
RxMemoryData1.AppendRecord([11, 'Microsoft Windows Vista', 180, 'Microsoft', EncodeDate(2007, 2, 1), 3]);
|
||||
RxMemoryData1.AppendRecord([12, 'Поисковая системя Яндекс', 0, 'Yandex', EncodeDate(2007, 2, 1), 3]);
|
||||
RxMemoryData1.AppendRecord([13, 'Бухгалтерия 1С', 280, '1С', EncodeDate(1994, 2, 1), 3]);
|
||||
RxMemoryData1.AppendRecord([14, 'Бух. комплекс "45-я Параллель"', 180, 'ООО "Boot"', EncodeDate(2007, 2, 1), 3]);
|
||||
RxMemoryData1.AppendRecord([15, 'Консультант+', 380, 'Консультант+', EncodeDate(2007, 2, 1), 3]);
|
||||
RxMemoryData1.AppendRecord([16, 'Гарант', 480, 'Гарант', EncodeDate(2007, 2, 1), 3]);
|
||||
RxMemoryData1.AppendRecord([17, 'Fedora Linux', 0, 'Open source', EncodeDate(2007, 2, 1), 3]);
|
||||
RxMemoryData1.AppendRecord([17, 'Ubuntu Linux', 0, 'Open source', EncodeDate(2007, 2, 1), 3]);
|
||||
RxMemoryData1.AppendRecord([17, 'Linux', 0, 'a', EncodeDate(2007, 2, 1), 3]);
|
||||
|
||||
RxMemoryData1.First;
|
||||
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.hlpAboutExecute(Sender: TObject);
|
||||
begin
|
||||
RxAboutDialog1.Execute;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.RxDBGrid1DataHintShow(Sender: TObject;
|
||||
CursorPos: TPoint; Cell: TGridCoord; Column: TRxColumn; var HintStr: string;
|
||||
var Processed: boolean);
|
||||
begin
|
||||
if Assigned(Column.Field) and (Column.Field = RxMemoryData1RAIT) then
|
||||
begin
|
||||
Processed:=true;
|
||||
if HintStr = '' then
|
||||
HintStr:='Not defined'
|
||||
else
|
||||
if HintStr = 'Positive' then
|
||||
HintStr:='A very good result'
|
||||
else
|
||||
if HintStr = 'Negative' then
|
||||
HintStr:='It''s too bad';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.RxDBGrid1Filtred(Sender: TObject);
|
||||
begin
|
||||
RxMemoryData1.First;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.RxDBGrid1GetCellProps(Sender: TObject;
|
||||
Field: TField; AFont: TFont; var Background: TColor);
|
||||
begin
|
||||
if (Field = RxMemoryData1PRICE1) and (RxMemoryData1PRICE1.AsFloat>99) then
|
||||
Background:=clRed;
|
||||
end;
|
||||
|
||||
|
||||
procedure TRxDBGridMainForm.showColumnsDialogExecute(Sender: TObject);
|
||||
begin
|
||||
RxDBGrid1.ShowColumnsDialog;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.showFindDialogExecute(Sender: TObject);
|
||||
begin
|
||||
RxDBGrid1.ShowFindDialog;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.sysExitExecute(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.Timer1Timer(Sender: TObject);
|
||||
var
|
||||
R: TRxColumn;
|
||||
begin
|
||||
R:=RxDBGrid1.ColumnByFieldName('Developer');
|
||||
if R.Footer.Color = clBlue then
|
||||
R.Footer.Color:=clNone
|
||||
else
|
||||
R.Footer.Color:=clBlue;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.TRxColumnEditButtons0Click(Sender: TObject);
|
||||
begin
|
||||
ShowMessage('Click first button');
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.TRxColumnEditButtons1Click(Sender: TObject);
|
||||
begin
|
||||
ShowMessage('Click next button');
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.TRxColumnEditButtons2Click(Sender: TObject);
|
||||
begin
|
||||
if RxMemoryData1.State <> dsEdit then
|
||||
RxMemoryData1.Edit;
|
||||
RxMemoryData1PRICE1.Clear;
|
||||
RxMemoryData1.Post;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.DoFillFilters;
|
||||
var
|
||||
C: TRxColumn;
|
||||
begin
|
||||
for C in RxDBGrid1.Columns do
|
||||
begin
|
||||
C.Filter.EmptyValue:='None...';
|
||||
C.Filter.ValueList.Add(C.Filter.EmptyValue);
|
||||
// C.Filter.Style:=;
|
||||
end;
|
||||
|
||||
RxMemoryData1.First;
|
||||
while not RxMemoryData1.EOF do
|
||||
begin
|
||||
for C in RxDBGrid1.Columns do
|
||||
begin
|
||||
if C.Filter.ValueList.IndexOf(C.Field.AsString)<0 then
|
||||
C.Filter.ValueList.Add(C.Field.AsString);
|
||||
end;
|
||||
RxMemoryData1.Next;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.actCalcTotalExecute(Sender: TObject);
|
||||
begin
|
||||
RxDBGrid1.CalcStatTotals;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.actOptimizeColumnsWidthAllExecute(Sender: TObject);
|
||||
begin
|
||||
RxDBGrid1.OptimizeColumnsWidthAll;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.actOptimizeWidthCol1Execute(Sender: TObject);
|
||||
begin
|
||||
TRxColumn(RxDBGrid1.SelectedColumn).OptimizeWidth;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.CheckBox1Change(Sender: TObject);
|
||||
begin
|
||||
if CheckBox1.Checked then
|
||||
RxDBGrid1.OptionsRx:=RxDBGrid1.OptionsRx + [rdgFilter]
|
||||
else
|
||||
RxDBGrid1.OptionsRx:=RxDBGrid1.OptionsRx - [rdgFilter];
|
||||
RxMemoryData1.Filtered:=CheckBox1.Checked;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.CheckBox2Change(Sender: TObject);
|
||||
begin
|
||||
RxDBGrid1.AutoFillColumns:=CheckBox2.Checked;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.CheckBox3Change(Sender: TObject);
|
||||
begin
|
||||
if CheckBox3.Checked then
|
||||
RxDBGrid1.Options:=RxDBGrid1.Options + [dgIndicator]
|
||||
else
|
||||
RxDBGrid1.Options:=RxDBGrid1.Options - [dgIndicator];
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.CheckBox4Change(Sender: TObject);
|
||||
begin
|
||||
if CheckBox4.Checked then
|
||||
RxDBGrid1.Options:=RxDBGrid1.Options + [dgTitles]
|
||||
else
|
||||
RxDBGrid1.Options:=RxDBGrid1.Options - [dgTitles];
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.CheckBox5Change(Sender: TObject);
|
||||
begin
|
||||
if CheckBox5.Checked then
|
||||
RxDBGrid1.OptionsRx:=RxDBGrid1.OptionsRx + [rdgWordWrap]
|
||||
else
|
||||
RxDBGrid1.OptionsRx:=RxDBGrid1.OptionsRx - [rdgWordWrap];
|
||||
end;
|
||||
|
||||
procedure TRxDBGridMainForm.ComboBox1Change(Sender: TObject);
|
||||
begin
|
||||
RxDBGrid1.ReadOnly:=ComboBox1.ItemIndex <> 0;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
BIN
RXLib/demos/rxdbgrid/RxDBGridGroupData/project1.ico
Normal file
After Width: | Height: | Size: 134 KiB |
83
RXLib/demos/rxdbgrid/RxDBGridGroupData/project1.lpi
Normal file
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="10"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="project1"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="4">
|
||||
<Item1>
|
||||
<PackageName Value="rxdbgrid_export_spreadsheet"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="FCL"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="rxnew"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item4>
|
||||
</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>
|
25
RXLib/demos/rxdbgrid/RxDBGridGroupData/project1.lpr
Normal file
@@ -0,0 +1,25 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms,
|
||||
rxnew,
|
||||
sysutils,
|
||||
Unit1
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource:=True;
|
||||
DefaultFormatSettings.ThousandSeparator:=' ';
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
332
RXLib/demos/rxdbgrid/RxDBGridGroupData/unit1.lfm
Normal file
@@ -0,0 +1,332 @@
|
||||
object Form1: TForm1
|
||||
Left = 570
|
||||
Height = 556
|
||||
Top = 275
|
||||
Width = 796
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 556
|
||||
ClientWidth = 796
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.9.0.0'
|
||||
object RxDBGrid1: TRxDBGrid
|
||||
Left = 0
|
||||
Height = 493
|
||||
Top = 63
|
||||
Width = 796
|
||||
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.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'GROUP'
|
||||
Width = 60
|
||||
FieldName = 'GROUP_ID'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Пусто)'
|
||||
Filter.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'SUM'
|
||||
Width = 90
|
||||
FieldName = 'SUM'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Пусто)'
|
||||
Filter.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footer.Alignment = taRightJustify
|
||||
Footer.FieldName = 'SUM'
|
||||
Footer.ValueType = fvtSum
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'TEXT'
|
||||
Width = 264
|
||||
FieldName = 'TEXT'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Пусто)'
|
||||
Filter.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
WordWrap = True
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'AAA'
|
||||
Width = 250
|
||||
FieldName = 'AAA'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Пусто)'
|
||||
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.Active = True
|
||||
FooterOptions.Color = clYellow
|
||||
FooterOptions.RowCount = 1
|
||||
FooterOptions.DrawFullLine = False
|
||||
SearchOptions.QuickSearchOptions = [loCaseInsensitive, loPartialKey]
|
||||
SearchOptions.FromStart = False
|
||||
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgFooterRows, rdgAllowQuickFilter]
|
||||
FooterColor = clYellow
|
||||
FooterRowCount = 1
|
||||
Align = alBottom
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
Color = clWindow
|
||||
DrawFullLine = False
|
||||
FocusColor = clRed
|
||||
SelectedColor = clHighlight
|
||||
GridLineStyle = psSolid
|
||||
DataSource = dsData
|
||||
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
|
||||
TabOrder = 0
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 6
|
||||
Height = 24
|
||||
Top = 6
|
||||
Width = 113
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Groups active'
|
||||
Checked = True
|
||||
OnChange = CheckBox1Change
|
||||
State = cbChecked
|
||||
TabOrder = 1
|
||||
end
|
||||
object CheckBox2: TCheckBox
|
||||
AnchorSideLeft.Control = CheckBox1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 125
|
||||
Height = 24
|
||||
Top = 6
|
||||
Width = 96
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Footer row'
|
||||
Checked = True
|
||||
OnChange = CheckBox1Change
|
||||
State = cbChecked
|
||||
TabOrder = 2
|
||||
end
|
||||
object CheckBox3: TCheckBox
|
||||
AnchorSideLeft.Control = CheckBox2
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 227
|
||||
Height = 24
|
||||
Top = 6
|
||||
Width = 88
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'ReadOnly'
|
||||
Checked = True
|
||||
OnChange = CheckBox1Change
|
||||
State = cbChecked
|
||||
TabOrder = 3
|
||||
end
|
||||
object Button1: TButton
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 682
|
||||
Height = 36
|
||||
Top = 6
|
||||
Width = 108
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Export to ODS'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 4
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 552
|
||||
Height = 20
|
||||
Top = 24
|
||||
Width = 42
|
||||
Caption = 'Label1'
|
||||
ParentColor = False
|
||||
end
|
||||
object rxData: TRxMemoryData
|
||||
FieldDefs = <
|
||||
item
|
||||
Name = 'ID'
|
||||
DataType = ftInteger
|
||||
end
|
||||
item
|
||||
Name = 'GROUP_ID'
|
||||
DataType = ftInteger
|
||||
end
|
||||
item
|
||||
Name = 'SUM'
|
||||
DataType = ftCurrency
|
||||
end
|
||||
item
|
||||
Name = 'TEXT'
|
||||
DataType = ftString
|
||||
Size = 500
|
||||
end
|
||||
item
|
||||
Name = 'AAA'
|
||||
DataType = ftString
|
||||
Size = 50
|
||||
end>
|
||||
AfterScroll = rxDataAfterScroll
|
||||
PacketRecords = 0
|
||||
Left = 432
|
||||
Top = 16
|
||||
object rxDataID: TLongintField
|
||||
FieldKind = fkData
|
||||
FieldName = 'ID'
|
||||
Index = 0
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
end
|
||||
object rxDataGROUP_ID: TLongintField
|
||||
FieldKind = fkData
|
||||
FieldName = 'GROUP_ID'
|
||||
Index = 1
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
end
|
||||
object rxDataSUM: TCurrencyField
|
||||
FieldKind = fkData
|
||||
FieldName = 'SUM'
|
||||
Index = 2
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
MaxValue = 0
|
||||
MinValue = 0
|
||||
Precision = 2
|
||||
end
|
||||
object rxDataTEXT: TStringField
|
||||
FieldKind = fkData
|
||||
FieldName = 'TEXT'
|
||||
Index = 3
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
Size = 500
|
||||
end
|
||||
object rxDataAAA: TStringField
|
||||
FieldKind = fkData
|
||||
FieldName = 'AAA'
|
||||
Index = 4
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
Size = 50
|
||||
end
|
||||
end
|
||||
object dsData: TDataSource
|
||||
DataSet = rxData
|
||||
Left = 392
|
||||
Top = 16
|
||||
end
|
||||
object RxDBGridExportSpreadSheet1: TRxDBGridExportSpreadSheet
|
||||
RxDBGrid = RxDBGrid1
|
||||
Caption = 'Экспорт в электронную таблицу'
|
||||
ShowSetupForm = True
|
||||
FileName = 'test.ods'
|
||||
PageName = 'test'
|
||||
Options = [ressExportTitle, ressExportColors, ressExportFooter, ressExportFormula, ressOverwriteExisting, ressExportSelectedRows, ressHideZeroValues, ressColSpanning]
|
||||
OpenAfterExport = True
|
||||
Left = 392
|
||||
Top = 168
|
||||
end
|
||||
end
|
99
RXLib/demos/rxdbgrid/RxDBGridGroupData/unit1.pas
Normal file
@@ -0,0 +1,99 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, rxdbgrid, rxmemds, RxDBGridExportSpreadSheet,
|
||||
Forms, Controls, Graphics, Dialogs, StdCtrls, db;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Button1: TButton;
|
||||
CheckBox1: TCheckBox;
|
||||
CheckBox2: TCheckBox;
|
||||
CheckBox3: TCheckBox;
|
||||
dsData: TDataSource;
|
||||
Label1: TLabel;
|
||||
rxDataAAA: TStringField;
|
||||
rxDataGROUP_ID: TLongintField;
|
||||
rxDataID: TLongintField;
|
||||
rxDataSUM: TCurrencyField;
|
||||
rxDataTEXT: TStringField;
|
||||
RxDBGrid1: TRxDBGrid;
|
||||
rxData: TRxMemoryData;
|
||||
RxDBGridExportSpreadSheet1: TRxDBGridExportSpreadSheet;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure CheckBox1Change(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure rxDataAfterScroll(DataSet: TDataSet);
|
||||
private
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
rxData.Open;
|
||||
for i:=1 to 200 do
|
||||
rxData.AppendRecord([i, ((i-1) div 4) + 1, Random * 1000, Format('Test string %d', [i])]);
|
||||
|
||||
RxDBGrid1.GroupItems.GroupFieldName:='GROUP_ID';
|
||||
RxDBGrid1.ColumnByFieldName('SUM').GroupParam.ValueType:=fvtSum;
|
||||
RxDBGrid1.ColumnByFieldName('SUM').GroupParam.Alignment:=taRightJustify;
|
||||
|
||||
RxDBGrid1.ColumnByFieldName('GROUP_ID').GroupParam.ValueType:=fvtCount;
|
||||
|
||||
RxDBGrid1.ColumnByFieldName('ID').GroupParam.ValueType:=fvtStaticText;
|
||||
RxDBGrid1.ColumnByFieldName('ID').GroupParam.StaticText:='Группа:';
|
||||
|
||||
RxDBGrid1.ColumnByFieldName('AAA').GroupParam.ValueType:=fvtFieldValue;
|
||||
RxDBGrid1.ColumnByFieldName('AAA').GroupParam.Alignment:=taCenter;
|
||||
RxDBGrid1.ColumnByFieldName('AAA').GroupParam.Color:=clRed;
|
||||
RxDBGrid1.GroupItems.Color:=clSkyBlue;
|
||||
|
||||
rxData.First;
|
||||
|
||||
CheckBox1Change(nil);
|
||||
end;
|
||||
|
||||
type
|
||||
THackRxDBGrid = class(TRxDBGrid);
|
||||
|
||||
procedure TForm1.rxDataAfterScroll(DataSet: TDataSet);
|
||||
begin
|
||||
Label1.Caption:=Format('ActiveRecord %d', [THackRxDBGrid(RxDBGrid1).DataLink.ActiveRecord]);
|
||||
end;
|
||||
|
||||
procedure TForm1.CheckBox1Change(Sender: TObject);
|
||||
begin
|
||||
RxDBGrid1.GroupItems.Active:=CheckBox1.Checked;
|
||||
RxDBGrid1.FooterOptions.Active:=CheckBox2.Checked;
|
||||
RxDBGrid1.ReadOnly:=CheckBox3.Checked;
|
||||
end;
|
||||
|
||||
procedure TForm1.Button1Click(Sender: TObject);
|
||||
begin
|
||||
RxDBGridExportSpreadSheet1.Options:=RxDBGridExportSpreadSheet1.Options + [ressExportGroupData];
|
||||
RxDBGridExportSpreadSheet1.Execute;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
BIN
RXLib/demos/rxdbgrid/RxDBGrid_ExportSpreadsheet/project1.ico
Normal file
After Width: | Height: | Size: 134 KiB |
86
RXLib/demos/rxdbgrid/RxDBGrid_ExportSpreadsheet/project1.lpi
Normal file
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="10"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="project1"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="4">
|
||||
<Item1>
|
||||
<PackageName Value="rxdbgrid_export_spreadsheet"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="FCL"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="rxnew"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item4>
|
||||
</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>
|
25
RXLib/demos/rxdbgrid/RxDBGrid_ExportSpreadsheet/project1.lpr
Normal file
@@ -0,0 +1,25 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms,
|
||||
sysutils,
|
||||
Unit1,
|
||||
rxnew
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
DefaultFormatSettings.ThousandSeparator:=' ';
|
||||
RequireDerivedFormResource := True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
306
RXLib/demos/rxdbgrid/RxDBGrid_ExportSpreadsheet/unit1.lfm
Normal file
@@ -0,0 +1,306 @@
|
||||
object Form1: TForm1
|
||||
Left = 381
|
||||
Height = 527
|
||||
Top = 195
|
||||
Width = 746
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 527
|
||||
ClientWidth = 746
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
ShowHint = True
|
||||
LCLVersion = '1.7'
|
||||
object RxDBGrid1: TRxDBGrid
|
||||
Left = 0
|
||||
Height = 450
|
||||
Hint = 'Список данных'
|
||||
Top = 77
|
||||
Width = 746
|
||||
ColumnDefValues.BlobText = '(blob)'
|
||||
TitleButtons = True
|
||||
AutoSort = True
|
||||
Columns = <
|
||||
item
|
||||
Color = clMoneyGreen
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'CODE'
|
||||
Width = 90
|
||||
FieldName = 'CODE'
|
||||
EditButtons = <>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Color = clAqua
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'NAME'
|
||||
Width = 350
|
||||
FieldName = 'NAME'
|
||||
EditButtons = <>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Value = 'Min value'
|
||||
ValueType = fvtStaticText
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Value = 'Max value'
|
||||
ValueType = fvtStaticText
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Value = 'Summa'
|
||||
ValueType = fvtStaticText
|
||||
end>
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'PRICE'
|
||||
Width = 120
|
||||
FieldName = 'PRICE'
|
||||
EditButtons = <>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footer.Alignment = taRightJustify
|
||||
Footer.FieldName = 'PRICE'
|
||||
Footer.ValueType = fvtSum
|
||||
Footers = <
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
FieldName = 'PRICE'
|
||||
ValueType = fvtMin
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
FieldName = 'PRICE'
|
||||
ValueType = fvtMax
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
FieldName = 'PRICE'
|
||||
ValueType = fvtSum
|
||||
end>
|
||||
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.Active = True
|
||||
FooterOptions.Color = clYellow
|
||||
FooterOptions.RowCount = 3
|
||||
FooterOptions.DrawFullLine = False
|
||||
SearchOptions.QuickSearchOptions = [loCaseInsensitive, loPartialKey]
|
||||
SearchOptions.FromStart = False
|
||||
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgFooterRows, rdgAllowToolMenu]
|
||||
FooterColor = clYellow
|
||||
FooterRowCount = 3
|
||||
OnDataHintShow = RxDBGrid1DataHintShow
|
||||
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, dgMultiselect, dgHeaderPushedLook]
|
||||
ParentColor = False
|
||||
TabOrder = 0
|
||||
TitleStyle = tsNative
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 77
|
||||
Top = 0
|
||||
Width = 746
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
ClientHeight = 77
|
||||
ClientWidth = 746
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
AnchorSideLeft.Control = Panel1
|
||||
AnchorSideTop.Control = Panel1
|
||||
Left = 7
|
||||
Height = 20
|
||||
Top = 7
|
||||
Width = 145
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'SpeadSheet file name '
|
||||
ParentColor = False
|
||||
end
|
||||
object FileNameEdit1: TFileNameEdit
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = Label1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 13
|
||||
Height = 37
|
||||
Hint = 'Укажите имя файла'
|
||||
Top = 33
|
||||
Width = 275
|
||||
FilterIndex = 0
|
||||
HideDirectories = False
|
||||
ButtonWidth = 23
|
||||
NumGlyphs = 1
|
||||
BorderSpacing.Around = 6
|
||||
MaxLength = 0
|
||||
TabOrder = 0
|
||||
end
|
||||
object Button1: TButton
|
||||
AnchorSideLeft.Control = FileNameEdit1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = FileNameEdit1
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 294
|
||||
Height = 33
|
||||
Hint = 'Начать выгрузку'
|
||||
Top = 35
|
||||
Width = 87
|
||||
Caption = 'Export data'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object RxMemoryData1: TRxMemoryData
|
||||
FieldDefs = <
|
||||
item
|
||||
Name = 'CODE'
|
||||
DataType = ftInteger
|
||||
end
|
||||
item
|
||||
Name = 'NAME'
|
||||
DataType = ftString
|
||||
Size = 300
|
||||
end
|
||||
item
|
||||
Name = 'PRICE'
|
||||
DataType = ftCurrency
|
||||
end>
|
||||
PacketRecords = 0
|
||||
left = 368
|
||||
top = 184
|
||||
object RxMemoryData1CODE: TLongintField
|
||||
DisplayWidth = 10
|
||||
FieldKind = fkData
|
||||
FieldName = 'CODE'
|
||||
Index = 0
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
end
|
||||
object RxMemoryData1NAME: TStringField
|
||||
DisplayWidth = 300
|
||||
FieldKind = fkData
|
||||
FieldName = 'NAME'
|
||||
Index = 1
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
Size = 300
|
||||
end
|
||||
object RxMemoryData1PRICE: TCurrencyField
|
||||
DisplayWidth = 10
|
||||
FieldKind = fkData
|
||||
FieldName = 'PRICE'
|
||||
Index = 2
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
MaxValue = 0
|
||||
MinValue = 0
|
||||
Precision = 2
|
||||
end
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = RxMemoryData1
|
||||
left = 328
|
||||
top = 184
|
||||
end
|
||||
object RxDBGridExportSpreadSheet1: TRxDBGridExportSpreadSheet
|
||||
RxDBGrid = RxDBGrid1
|
||||
Caption = 'Экспорт в электронную таблицу'
|
||||
ShowSetupForm = True
|
||||
OnBeforeExecute = RxDBGridExportSpreadSheet1BeforeExecute
|
||||
PageName = 'Test page'
|
||||
Options = [ressExportTitle, ressExportColors, ressExportFooter, ressExportFormula, ressOverwriteExisting]
|
||||
OpenAfterExport = True
|
||||
left = 336
|
||||
top = 256
|
||||
end
|
||||
end
|
88
RXLib/demos/rxdbgrid/RxDBGrid_ExportSpreadsheet/unit1.pas
Normal file
@@ -0,0 +1,88 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, rxdbgrid, rxmemds, RxDBGridExportSpreadSheet,
|
||||
Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, EditBtn, db, Types, Grids;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Button1: TButton;
|
||||
DataSource1: TDataSource;
|
||||
FileNameEdit1: TFileNameEdit;
|
||||
Label1: TLabel;
|
||||
Panel1: TPanel;
|
||||
RxDBGrid1: TRxDBGrid;
|
||||
RxDBGridExportSpreadSheet1: TRxDBGridExportSpreadSheet;
|
||||
RxMemoryData1: TRxMemoryData;
|
||||
RxMemoryData1CODE: TLongintField;
|
||||
RxMemoryData1NAME: TStringField;
|
||||
RxMemoryData1PRICE: TCurrencyField;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure RxDBGrid1DataHintShow(Sender: TObject; CursorPos: TPoint;
|
||||
Cell: TGridCoord; Column: TRxColumn; var HintStr: string;
|
||||
var Processed: boolean);
|
||||
procedure RxDBGridExportSpreadSheet1BeforeExecute(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
uses LCLIntf;
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
var
|
||||
i:integer;
|
||||
begin
|
||||
RxMemoryData1.Open;
|
||||
//fill test values
|
||||
for i:=1 to 50 do
|
||||
begin
|
||||
RxMemoryData1.Append;
|
||||
RxMemoryData1CODE.AsInteger:=i;
|
||||
RxMemoryData1NAME.AsString:=Format('Line %d', [i]);
|
||||
RxMemoryData1PRICE.AsFloat:=Random * 100 + 5;
|
||||
RxMemoryData1.Post;
|
||||
end;
|
||||
RxMemoryData1.First;
|
||||
|
||||
FileNameEdit1.Text:='test1.ods';
|
||||
end;
|
||||
|
||||
procedure TForm1.RxDBGrid1DataHintShow(Sender: TObject; CursorPos: TPoint;
|
||||
Cell: TGridCoord; Column: TRxColumn; var HintStr: string;
|
||||
var Processed: boolean);
|
||||
begin
|
||||
HintStr:='Это очень чётная строка! ' + HintStr;
|
||||
Processed:=true;
|
||||
end;
|
||||
|
||||
procedure TForm1.RxDBGridExportSpreadSheet1BeforeExecute(Sender: TObject);
|
||||
begin
|
||||
RxDBGridExportSpreadSheet1.FileName:=FileNameEdit1.Text;
|
||||
end;
|
||||
|
||||
procedure TForm1.Button1Click(Sender: TObject);
|
||||
begin
|
||||
RxDBGridExportSpreadSheet1.Execute;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
BIN
RXLib/demos/rxdbgrid/RxDBGrid_Filter/ZEOS/project1.ico
Normal file
After Width: | Height: | Size: 134 KiB |
86
RXLib/demos/rxdbgrid/RxDBGrid_Filter/ZEOS/project1.lpi
Normal file
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="10"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="project1"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="5">
|
||||
<Item1>
|
||||
<PackageName Value="rx_sort_zeos"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="FCL"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="rxnew"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<PackageName Value="zcomponent"/>
|
||||
</Item4>
|
||||
<Item5>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item5>
|
||||
</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>
|
21
RXLib/demos/rxdbgrid/RxDBGrid_Filter/ZEOS/project1.lpr
Normal file
@@ -0,0 +1,21 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, zcomponent, Unit1, rxnew
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
204
RXLib/demos/rxdbgrid/RxDBGrid_Filter/ZEOS/unit1.lfm
Normal file
@@ -0,0 +1,204 @@
|
||||
object Form1: TForm1
|
||||
Left = 684
|
||||
Height = 486
|
||||
Top = 345
|
||||
Width = 741
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 486
|
||||
ClientWidth = 741
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.9.0.0'
|
||||
object RxDBGrid1: TRxDBGrid
|
||||
Left = 0
|
||||
Height = 486
|
||||
Top = 0
|
||||
Width = 741
|
||||
ColumnDefValues.BlobText = '(данные)'
|
||||
TitleButtons = True
|
||||
AutoSort = True
|
||||
Columns = <
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'DEP|DEPT_NO'
|
||||
Width = 70
|
||||
FieldName = 'DEPT_NO'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Пусто)'
|
||||
Filter.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'DEP|DEPARTMENT'
|
||||
Width = 250
|
||||
FieldName = 'DEPARTMENT'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Пусто)'
|
||||
Filter.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'LOCATION'
|
||||
Width = 250
|
||||
FieldName = 'LOCATION'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Пусто)'
|
||||
Filter.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Filter.Style = rxfstDialog
|
||||
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, rdgDblClickOptimizeColWidth, rdgFilter, rdgAllowQuickSearch, rdgAllowQuickFilter, rdgAllowFilterForm, rdgAllowSortForm, 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, dgHeaderPushedLook]
|
||||
ParentColor = False
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
object ZConnection1: TZConnection
|
||||
ControlsCodePage = cCP_UTF8
|
||||
TransactIsolationLevel = tiReadCommitted
|
||||
Connected = True
|
||||
HostName = '127.0.0.1'
|
||||
Port = 0
|
||||
Database = 'employee'
|
||||
User = 'sysdba'
|
||||
Password = 'masterkey'
|
||||
Protocol = 'firebirdd-2.5'
|
||||
Left = 40
|
||||
Top = 24
|
||||
end
|
||||
object ZReadOnlyQuery1: TZReadOnlyQuery
|
||||
Connection = ZConnection1
|
||||
OnFilterRecord = ZReadOnlyQuery1FilterRecord
|
||||
SQL.Strings = (
|
||||
'select'
|
||||
' DEPARTMENT.DEPT_NO,'
|
||||
' DEPARTMENT.DEPARTMENT,'
|
||||
' DEPARTMENT.LOCATION'
|
||||
'from'
|
||||
' DEPARTMENT'
|
||||
'order by'
|
||||
' DEPARTMENT.DEPT_NO'
|
||||
)
|
||||
Params = <>
|
||||
Left = 248
|
||||
Top = 168
|
||||
object ZReadOnlyQuery1DEPT_NO: TStringField
|
||||
FieldKind = fkData
|
||||
FieldName = 'DEPT_NO'
|
||||
Index = 0
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = True
|
||||
Size = 12
|
||||
end
|
||||
object ZReadOnlyQuery1DEPARTMENT: TStringField
|
||||
FieldKind = fkData
|
||||
FieldName = 'DEPARTMENT'
|
||||
Index = 1
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = True
|
||||
Size = 100
|
||||
end
|
||||
object ZReadOnlyQuery1LOCATION: TStringField
|
||||
FieldKind = fkData
|
||||
FieldName = 'LOCATION'
|
||||
Index = 2
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
Size = 60
|
||||
end
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ZReadOnlyQuery1
|
||||
Left = 216
|
||||
Top = 168
|
||||
end
|
||||
object RxSortZeos1: TRxSortZeos
|
||||
Left = 95
|
||||
Top = 24
|
||||
end
|
||||
end
|
55
RXLib/demos/rxdbgrid/RxDBGrid_Filter/ZEOS/unit1.pas
Normal file
@@ -0,0 +1,55 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, rxdbgrid, RxSortZeos, ZConnection, ZDataset,
|
||||
Forms, Controls, Graphics, Dialogs, db;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
DataSource1: TDataSource;
|
||||
RxDBGrid1: TRxDBGrid;
|
||||
RxSortZeos1: TRxSortZeos;
|
||||
ZConnection1: TZConnection;
|
||||
ZReadOnlyQuery1: TZReadOnlyQuery;
|
||||
ZReadOnlyQuery1DEPARTMENT: TStringField;
|
||||
ZReadOnlyQuery1DEPT_NO: TStringField;
|
||||
ZReadOnlyQuery1LOCATION: TStringField;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ZReadOnlyQuery1FilterRecord(DataSet: TDataSet; var Accept: Boolean
|
||||
);
|
||||
private
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
ZConnection1.Connected:=true;
|
||||
ZReadOnlyQuery1.Open;
|
||||
end;
|
||||
|
||||
procedure TForm1.ZReadOnlyQuery1FilterRecord(DataSet: TDataSet;
|
||||
var Accept: Boolean);
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
end.
|
||||
|
BIN
RXLib/demos/rxdbgrid/RxDBGrid_Filter/project1.ico
Normal file
After Width: | Height: | Size: 134 KiB |
84
RXLib/demos/rxdbgrid/RxDBGrid_Filter/project1.lpi
Normal file
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="project1"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="1">
|
||||
<Mode0 Name="default"/>
|
||||
</Modes>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="4">
|
||||
<Item1>
|
||||
<PackageName Value="FCL"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LazControls"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="rxnew"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item4>
|
||||
</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>
|
20
RXLib/demos/rxdbgrid/RxDBGrid_Filter/project1.lpr
Normal file
@@ -0,0 +1,20 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1, rxnew, lazcontrols;
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
234
RXLib/demos/rxdbgrid/RxDBGrid_Filter/unit1.lfm
Normal file
@@ -0,0 +1,234 @@
|
||||
object Form1: TForm1
|
||||
Left = 612
|
||||
Height = 444
|
||||
Top = 268
|
||||
Width = 702
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 444
|
||||
ClientWidth = 702
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.9.0.0'
|
||||
object RxDBGrid1: TRxDBGrid
|
||||
Left = 0
|
||||
Height = 444
|
||||
Top = 0
|
||||
Width = 702
|
||||
ColumnDefValues.BlobText = '(blob)'
|
||||
TitleButtons = True
|
||||
AutoSort = True
|
||||
Columns = <
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'ID_R'
|
||||
Width = 60
|
||||
FieldName = 'ID_R'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Empty)'
|
||||
Filter.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'ID'
|
||||
Width = 60
|
||||
FieldName = 'ID'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Empty)'
|
||||
Filter.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Filter.Style = rxfstDialog
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'CODE'
|
||||
Width = 60
|
||||
FieldName = 'CODE'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Empty)'
|
||||
Filter.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Filter.Style = rxfstDialog
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'NAME'
|
||||
Width = 350
|
||||
FieldName = 'NAME'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Empty)'
|
||||
Filter.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Filter.Style = rxfstDialog
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'CODE1'
|
||||
FieldName = 'CODE'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Empty)'
|
||||
Filter.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Filter.Style = rxfstDialog
|
||||
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, rdgFilter, rdgAllowQuickFilter, rdgAllowFilterForm, rdgAllowToolMenu]
|
||||
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, dgHeaderPushedLook]
|
||||
TabOrder = 0
|
||||
end
|
||||
object rxData: TRxMemoryData
|
||||
FieldDefs = <
|
||||
item
|
||||
Name = 'ID_R'
|
||||
DataType = ftInteger
|
||||
end
|
||||
item
|
||||
Name = 'ID'
|
||||
DataType = ftInteger
|
||||
end
|
||||
item
|
||||
Name = 'CODE'
|
||||
DataType = ftInteger
|
||||
end
|
||||
item
|
||||
Name = 'NAME'
|
||||
DataType = ftString
|
||||
Size = 200
|
||||
end>
|
||||
AfterInsert = rxDataAfterInsert
|
||||
PacketRecords = 0
|
||||
Left = 459
|
||||
Top = 245
|
||||
object rxDataID: TLongintField
|
||||
FieldKind = fkData
|
||||
FieldName = 'ID'
|
||||
Index = 0
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
end
|
||||
object rxDataCODE: TLongintField
|
||||
FieldKind = fkData
|
||||
FieldName = 'CODE'
|
||||
Index = 1
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
end
|
||||
object rxDataNAME: TStringField
|
||||
FieldKind = fkData
|
||||
FieldName = 'NAME'
|
||||
Index = 2
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
Size = 200
|
||||
end
|
||||
object rxDataID_R: TLongintField
|
||||
FieldKind = fkData
|
||||
FieldName = 'ID_R'
|
||||
Index = 3
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
end
|
||||
end
|
||||
object dsData: TDataSource
|
||||
DataSet = rxData
|
||||
Left = 416
|
||||
Top = 245
|
||||
end
|
||||
end
|
60
RXLib/demos/rxdbgrid/RxDBGrid_Filter/unit1.pas
Normal file
@@ -0,0 +1,60 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, rxdbgrid, rxmemds, Forms, Controls, Graphics,
|
||||
Dialogs, StdCtrls, db;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
dsData: TDataSource;
|
||||
rxDataID_R: TLongintField;
|
||||
RxDBGrid1: TRxDBGrid;
|
||||
rxData: TRxMemoryData;
|
||||
rxDataCODE: TLongintField;
|
||||
rxDataID: TLongintField;
|
||||
rxDataNAME: TStringField;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure rxDataAfterInsert(DataSet: TDataSet);
|
||||
private
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
rxData.Open;
|
||||
for i:=1 to 20 do
|
||||
begin
|
||||
rxData.AppendRecord([i, i mod 4, Format('Line %d', [i])]);
|
||||
if i mod 5 = 0 then
|
||||
rxData.AppendRecord([null, null, 'Пустая строка']);
|
||||
end;
|
||||
rxData.First;
|
||||
end;
|
||||
|
||||
procedure TForm1.rxDataAfterInsert(DataSet: TDataSet);
|
||||
begin
|
||||
rxDataID_R.AsInteger:=rxData.RecordCount + 1;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
BIN
RXLib/demos/rxdbgrid/RxDBGrid_Sort_IBX/project1.ico
Normal file
After Width: | Height: | Size: 134 KiB |
89
RXLib/demos/rxdbgrid/RxDBGrid_Sort_IBX/project1.lpi
Normal file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="project1"/>
|
||||
<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="5">
|
||||
<Item1>
|
||||
<PackageName Value="rx_sort_ibx"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="FCL"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="rxnew"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<PackageName Value="ibexpress"/>
|
||||
</Item4>
|
||||
<Item5>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item5>
|
||||
</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
RXLib/demos/rxdbgrid/RxDBGrid_Sort_IBX/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, ibexpress, rxnew, Unit1
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Scaled:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
287
RXLib/demos/rxdbgrid/RxDBGrid_Sort_IBX/unit1.lfm
Normal file
@@ -0,0 +1,287 @@
|
||||
object Form1: TForm1
|
||||
Left = 552
|
||||
Height = 475
|
||||
Top = 244
|
||||
Width = 695
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 475
|
||||
ClientWidth = 695
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.9.0.0'
|
||||
object Button1: TButton
|
||||
Left = 337
|
||||
Height = 25
|
||||
Top = 63
|
||||
Width = 75
|
||||
Caption = 'Button1'
|
||||
TabOrder = 0
|
||||
end
|
||||
object PageControl1: TPageControl
|
||||
Left = 0
|
||||
Height = 475
|
||||
Top = 0
|
||||
Width = 695
|
||||
ActivePage = TabSheet2
|
||||
Align = alClient
|
||||
TabIndex = 1
|
||||
TabOrder = 1
|
||||
object TabSheet1: TTabSheet
|
||||
Caption = 'TIBQuery'
|
||||
ClientHeight = 441
|
||||
ClientWidth = 685
|
||||
object RxDBGrid1: TRxDBGrid
|
||||
Left = 0
|
||||
Height = 441
|
||||
Top = 0
|
||||
Width = 685
|
||||
ColumnDefValues.BlobText = '(данные)'
|
||||
TitleButtons = True
|
||||
AutoSort = True
|
||||
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 = DataSource1
|
||||
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgHeaderPushedLook]
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object TabSheet2: TTabSheet
|
||||
Caption = 'TIBDataSet'
|
||||
ClientHeight = 441
|
||||
ClientWidth = 685
|
||||
object RxDBGrid2: TRxDBGrid
|
||||
Left = 0
|
||||
Height = 441
|
||||
Top = 0
|
||||
Width = 685
|
||||
ColumnDefValues.BlobText = '(данные)'
|
||||
TitleButtons = True
|
||||
AutoSort = True
|
||||
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 = DataSource2
|
||||
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgHeaderPushedLook]
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
object IBQuery1: TIBQuery
|
||||
Database = IBDatabase1
|
||||
Transaction = IBTransaction1
|
||||
AutoStartTransaction = True
|
||||
AutoCommit = True
|
||||
AutoTrim = True
|
||||
BufferChunks = 1000
|
||||
CachedUpdates = False
|
||||
GeneratorField.ApplyOnEvent = gaeOnNewRecord
|
||||
SQL.Strings = (
|
||||
'select'
|
||||
' *'
|
||||
'from'
|
||||
' employee'
|
||||
)
|
||||
Params = <>
|
||||
Left = 80
|
||||
Top = 88
|
||||
end
|
||||
object IBDatabase1: TIBDatabase
|
||||
Connected = True
|
||||
LoginPrompt = False
|
||||
AllowStreamedConnected = False
|
||||
DatabaseName = '127.0.0.1:employee'
|
||||
Params.Strings = (
|
||||
'lc_ctype=UTF8'
|
||||
'user_name=sysdba'
|
||||
'password=masterkey'
|
||||
)
|
||||
LibraryName = '/usr/lib64/libfbclient.so.3.0.2'
|
||||
DefaultTransaction = IBTransaction1
|
||||
IdleTimer = 0
|
||||
TraceFlags = []
|
||||
Left = 32
|
||||
Top = 20
|
||||
end
|
||||
object IBTransaction1: TIBTransaction
|
||||
Active = False
|
||||
DefaultDatabase = IBDatabase1
|
||||
Left = 80
|
||||
Top = 20
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = IBQuery1
|
||||
Left = 120
|
||||
Top = 88
|
||||
end
|
||||
object IBDataSet1: TIBDataSet
|
||||
Database = IBDatabase1
|
||||
Transaction = IBTransaction1
|
||||
AutoStartTransaction = True
|
||||
AutoCommit = True
|
||||
AutoTrim = True
|
||||
AutoParamToField = True
|
||||
UpdateTransaction = IBTransaction1
|
||||
RetFields = True
|
||||
BufferChunks = 1000
|
||||
CachedUpdates = False
|
||||
DeleteSQL.Strings = (
|
||||
'Delete From COUNTRY A'
|
||||
'Where A.COUNTRY = :COUNTRY'
|
||||
)
|
||||
InsertSQL.Strings = (
|
||||
'Insert Into COUNTRY(CURRENCY)'
|
||||
'Values(:CURRENCY) Returning COUNTRY'
|
||||
)
|
||||
RefreshSQL.Strings = (
|
||||
'Select A.COUNTRY, A.CURRENCY From COUNTRY A'
|
||||
'Where A.COUNTRY = :COUNTRY'
|
||||
)
|
||||
SelectSQL.Strings = (
|
||||
'Select A.COUNTRY, A.CURRENCY From COUNTRY A'
|
||||
)
|
||||
ModifySQL.Strings = (
|
||||
'Update COUNTRY A Set '#13#10' A.COUNTRY = :COUNTRY,'#13#10' A.CURRENCY = :CURRENCY'
|
||||
'Where A.COUNTRY = :OLD_COUNTRY'
|
||||
)
|
||||
GeneratorField.ApplyOnEvent = gaeOnNewRecord
|
||||
DefValueFromServer = False
|
||||
DetailConditoins = []
|
||||
Left = 80
|
||||
Top = 216
|
||||
end
|
||||
object RxSortIBX1: TRxSortIBX
|
||||
Left = 424
|
||||
Top = 48
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = IBDataSet1
|
||||
Left = 120
|
||||
Top = 216
|
||||
end
|
||||
end
|
54
RXLib/demos/rxdbgrid/RxDBGrid_Sort_IBX/unit1.pas
Normal file
@@ -0,0 +1,54 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls, db,
|
||||
IBQuery, IBDatabase, IBCustomDataSet, rxdbgrid, RxSortIBX;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Button1: TButton;
|
||||
DataSource1: TDataSource;
|
||||
DataSource2: TDataSource;
|
||||
IBDatabase1: TIBDatabase;
|
||||
IBDataSet1: TIBDataSet;
|
||||
IBQuery1: TIBQuery;
|
||||
IBTransaction1: TIBTransaction;
|
||||
PageControl1: TPageControl;
|
||||
RxDBGrid1: TRxDBGrid;
|
||||
RxDBGrid2: TRxDBGrid;
|
||||
RxSortIBX1: TRxSortIBX;
|
||||
TabSheet1: TTabSheet;
|
||||
TabSheet2: TTabSheet;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
IBDatabase1.Connected:=true;
|
||||
IBTransaction1.StartTransaction;
|
||||
IBQuery1.Open;
|
||||
IBDataSet1.Open;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
BIN
RXLib/demos/rxdbgrid/RxDbGridExportToPDF/project1.ico
Normal file
After Width: | Height: | Size: 134 KiB |
84
RXLib/demos/rxdbgrid/RxDbGridExportToPDF/project1.lpi
Normal file
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="project1"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="1">
|
||||
<Mode0 Name="default"/>
|
||||
</Modes>
|
||||
</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="4">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<Name Value="ETTF"/>
|
||||
</Item4>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
22
RXLib/demos/rxdbgrid/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.
|
||||
|
567
RXLib/demos/rxdbgrid/RxDbGridExportToPDF/unit1.lfm
Normal file
@@ -0,0 +1,567 @@
|
||||
object Form1: TForm1
|
||||
Left = 558
|
||||
Height = 397
|
||||
Top = 319
|
||||
Width = 1043
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 397
|
||||
ClientWidth = 1043
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.9.0.0'
|
||||
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 = 477
|
||||
Height = 36
|
||||
Top = 7
|
||||
Width = 88
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Create PDF'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 0
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
AnchorSideLeft.Control = Button1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Panel1
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 571
|
||||
Height = 24
|
||||
Top = 13
|
||||
Width = 105
|
||||
Caption = 'Enable tools'
|
||||
Checked = True
|
||||
OnChange = CheckBox1Change
|
||||
State = cbChecked
|
||||
TabOrder = 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 = True
|
||||
AutoSort = True
|
||||
Columns = <
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'ID'
|
||||
Width = 50
|
||||
FieldName = 'ID'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Color = clSkyBlue
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'Дата поставки'
|
||||
Width = 120
|
||||
FieldName = 'PDATE'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
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.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footer.Alignment = taRightJustify
|
||||
Footer.Value = 'Итого:'
|
||||
Footer.ValueType = fvtStaticText
|
||||
Footers = <
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Value = 'Итого:'
|
||||
ValueType = fvtStaticText
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Value = 'Минимум:'
|
||||
ValueType = fvtStaticText
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Value = 'Максимум:'
|
||||
ValueType = fvtStaticText
|
||||
end>
|
||||
WordWrap = True
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'Сумма'
|
||||
Width = 100
|
||||
FieldName = 'SUM'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footer.Alignment = taRightJustify
|
||||
Footer.DisplayFormat = '#,##0.00'
|
||||
Footer.FieldName = 'SUM'
|
||||
Footer.ValueType = fvtSum
|
||||
Footers = <
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
DisplayFormat = '#,##0.00'
|
||||
FieldName = 'SUM'
|
||||
ValueType = fvtSum
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
DisplayFormat = '#,##0.00'
|
||||
FieldName = 'SUM'
|
||||
ValueType = fvtMin
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
DisplayFormat = '#,##0.00'
|
||||
FieldName = 'SUM'
|
||||
ValueType = fvtMax
|
||||
end>
|
||||
end
|
||||
item
|
||||
Alignment = taCenter
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'Статус'
|
||||
Width = 60
|
||||
FieldName = 'FLAG'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
ImageList = ImageList1
|
||||
KeyList.Strings = (
|
||||
'0=0'
|
||||
'1=1'
|
||||
'2=2'
|
||||
'3=3'
|
||||
)
|
||||
end
|
||||
item
|
||||
Alignment = taCenter
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'Адрес|Страна'
|
||||
Width = 200
|
||||
FieldName = 'Country'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
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.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
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.Active = True
|
||||
FooterOptions.Color = clYellow
|
||||
FooterOptions.RowCount = 3
|
||||
FooterOptions.DrawFullLine = True
|
||||
SearchOptions.QuickSearchOptions = [loCaseInsensitive, loPartialKey]
|
||||
SearchOptions.FromStart = False
|
||||
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgFooterRows, rdgAllowQuickFilter, rdgAllowToolMenu, rdgWordWrap]
|
||||
FooterColor = clYellow
|
||||
FooterRowCount = 3
|
||||
Align = alClient
|
||||
Color = clWindow
|
||||
DrawFullLine = True
|
||||
FocusColor = clRed
|
||||
SelectedColor = clHighlight
|
||||
GridLineStyle = psSolid
|
||||
DataSource = DataSource1
|
||||
Flat = True
|
||||
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgHeaderPushedLook]
|
||||
TabOrder = 0
|
||||
TitleStyle = tsNative
|
||||
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
|
||||
Precision = -1
|
||||
end
|
||||
item
|
||||
Name = 'NAME'
|
||||
DataType = ftString
|
||||
Precision = -1
|
||||
Size = 220
|
||||
end
|
||||
item
|
||||
Name = 'PDATE'
|
||||
DataType = ftDate
|
||||
Precision = -1
|
||||
end
|
||||
item
|
||||
Name = 'SUM'
|
||||
DataType = ftCurrency
|
||||
Precision = 2
|
||||
end
|
||||
item
|
||||
Name = 'Country'
|
||||
DataType = ftString
|
||||
Precision = -1
|
||||
Size = 100
|
||||
end
|
||||
item
|
||||
Name = 'Sity'
|
||||
DataType = ftString
|
||||
Precision = -1
|
||||
Size = 100
|
||||
end
|
||||
item
|
||||
Name = 'FLAG'
|
||||
DataType = ftInteger
|
||||
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
|
||||
DisplayFormat = 'dd.mm.yyyy'
|
||||
end
|
||||
object RxMemoryData1SUM: TCurrencyField
|
||||
FieldKind = fkData
|
||||
FieldName = 'SUM'
|
||||
Index = 3
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
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
|
||||
object RxMemoryData1FLAG: TLongintField
|
||||
FieldKind = fkData
|
||||
FieldName = 'FLAG'
|
||||
Index = 6
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
end
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = RxMemoryData1
|
||||
Left = 104
|
||||
Top = 88
|
||||
end
|
||||
object RxDBGridExportPDF1: TRxDBGridExportPDF
|
||||
RxDBGrid = RxDBGrid1
|
||||
Caption = 'Export to PDF file'
|
||||
Enabled = True
|
||||
FileName = 'test111.pdf'
|
||||
Options = [repExportTitle, repExportColors, repExportFooter, repOverwriteExisting, repExportImages]
|
||||
PdfOptions.PaperOrientation = ppoLandscape
|
||||
PdfOptions.Options = [poCompressText, poCompressFonts, poCompressImages, poUseRawJPEG]
|
||||
OpenAfterExport = True
|
||||
AuthorPdf = 'Lagunov A.A.'
|
||||
ProducerPdf = 'Test project'
|
||||
PageMargin.Left = 40
|
||||
PageMargin.Top = 40
|
||||
PageMargin.Right = 40
|
||||
PageMargin.Bottom = 40
|
||||
Left = 112
|
||||
Top = 160
|
||||
end
|
||||
object ImageList1: TImageList
|
||||
Left = 112
|
||||
Top = 224
|
||||
Bitmap = {
|
||||
4C6903000000100000001000000000000000000000FF000000FF000000000000
|
||||
0000000000FF000000FF0000000000000000000000FF000000FF000000000000
|
||||
000000000000000000000000000000000000000000FFFF0000FF000000FF0000
|
||||
00FF800000FFFF0000FF000000FF000000FF800000FFFF0000FF000000FF0000
|
||||
00FF000000FF000000FF000000000000000000000000000000FFFF0000FF8000
|
||||
00FF800000FFFF0000FFFF0000FF800000FF800000FFFF0000FFFF0000FF8000
|
||||
00FF000000FF00000000000000000000000000000000000000FFFF0000FF8000
|
||||
00FF800000FFFF0000FFFF0000FF800000FF800000FFFF0000FFFF0000FF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000FFFF00
|
||||
00FF800000FF800000FFFF0000FFFF0000FF800000FF800000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000FFFF00
|
||||
00FF800000FF800000FFFF0000FFFF0000FF000000FF000000FF000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00FFFF0000FF800000FF000000FF000000FF0000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00FFFF0000FF000000FF00000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000FF0000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000FF0000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000FF00000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000FF00000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000FF000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000FF000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF0000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF0000000000000000000000000000
|
||||
000000000000000000000000000000000000000000FF000000FF000000000000
|
||||
0000000000FF000000FF0000000000000000000000FF000000FF000000000000
|
||||
000000000000000000000000000000000000000000FF0000FFFF000000FF0000
|
||||
00FF000080FF0000FFFF000000FF000000FF000080FF0000FFFF000000FF0000
|
||||
00FF000000FF000000FF000000000000000000000000000000FF0000FFFF0000
|
||||
80FF000080FF0000FFFF0000FFFF000080FF000080FF0000FFFF0000FFFF0000
|
||||
80FF000000FF00000000000000000000000000000000000000FF0000FFFF0000
|
||||
80FF000080FF0000FFFF0000FFFF000080FF000080FF0000FFFF0000FFFF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000FF0000
|
||||
FFFF000080FF000080FF0000FFFF0000FFFF000080FF000080FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000FF0000
|
||||
FFFF000080FF000080FF0000FFFF0000FFFF000000FF000000FF000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00FF0000FFFF000080FF000000FF000000FF0000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00FF0000FFFF000000FF00000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000FF0000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000FF0000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000FF00000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000FF00000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000FF000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000FF000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF0000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF0000000000000000000000000000
|
||||
000000000000000000000000000000000000000000FF000000FF000000000000
|
||||
0000000000FF000000FF0000000000000000000000FF000000FF000000000000
|
||||
000000000000000000000000000000000000000000FF00FFFFFF000000FF0000
|
||||
00FF008080FF00FFFFFF000000FF000000FF008080FF00FFFFFF000000FF0000
|
||||
00FF000000FF000000FF000000000000000000000000000000FF00FFFFFF0080
|
||||
80FF008080FF00FFFFFF00FFFFFF008080FF008080FF00FFFFFF00FFFFFF0080
|
||||
80FF000000FF00000000000000000000000000000000000000FF00FFFFFF0080
|
||||
80FF008080FF00FFFFFF00FFFFFF008080FF008080FF00FFFFFF00FFFFFF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000FF00FF
|
||||
FFFF008080FF008080FF00FFFFFF00FFFFFF008080FF008080FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000FF00FF
|
||||
FFFF008080FF008080FF00FFFFFF00FFFFFF000000FF000000FF000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00FF00FFFFFF008080FF000000FF000000FF0000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00FF00FFFFFF000000FF00000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000FF0000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000FF0000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000FF00000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000FF00000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000FF000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000FF000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF0000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF0000000000000000000000000000
|
||||
0000000000000000000000000000
|
||||
}
|
||||
BitmapAdv = {
|
||||
4C6900000000
|
||||
}
|
||||
end
|
||||
end
|
170
RXLib/demos/rxdbgrid/RxDbGridExportToPDF/unit1.pas
Normal file
@@ -0,0 +1,170 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, rxmemds, rxdbgrid, RxDBGridExportPdf,
|
||||
Forms, Controls,
|
||||
Graphics, Dialogs, ExtCtrls, StdCtrls, ComCtrls, Spin, db;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Button1: TButton;
|
||||
CheckBox1: TCheckBox;
|
||||
DataSource1: TDataSource;
|
||||
ImageList1: TImageList;
|
||||
Memo1: TMemo;
|
||||
PageControl1: TPageControl;
|
||||
Panel1: TPanel;
|
||||
RxDBGrid1: TRxDBGrid;
|
||||
RxDBGridExportPDF1: TRxDBGridExportPDF;
|
||||
RxMemoryData1: TRxMemoryData;
|
||||
RxMemoryData1Country: TStringField;
|
||||
RxMemoryData1FLAG: TLongintField;
|
||||
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;
|
||||
procedure CreateFontDirList;
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
uses fpTTF, LazFileUtils;
|
||||
|
||||
{$R *.lfm}
|
||||
const
|
||||
TestText = 'Образец текста';
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
RxDBGridExportPDF1.ShowSetupForm:=true;
|
||||
PageControl1.ActivePageIndex:=0;
|
||||
RxMemoryData1.Open;
|
||||
RxMemoryData1.AppendRecord([1, 'Строка с длинным текстом 1', now, 100, 'Россия', 'Москва', 0]);
|
||||
RxMemoryData1.AppendRecord([2, 'Строка с длинным текстом 2', now - 1, 100, 'Россия', 'Ставрополь', 1]);
|
||||
RxMemoryData1.AppendRecord([3, 'Строка с длинным текстом 3', now - 2, 110, 'Россия', 'Калининград', 2]);
|
||||
RxMemoryData1.AppendRecord([4, 'Строка с длинным текстом 4', now - 3, 5000, 'Россия', 'Владивасток', 0]);
|
||||
RxMemoryData1.AppendRecord([5, 'Строка с длинным текстом 5', now - 4, 123.31, 'USA', 'New-York', 0]);
|
||||
RxMemoryData1.AppendRecord([6, 'Строка с длинным текстом 6', now, 100, 'Россия', 'Москва', 0]);
|
||||
RxMemoryData1.AppendRecord([7, 'Строка с длинным текстом 7', now - 1, 100, 'Россия', 'Ставрополь', 2]);
|
||||
RxMemoryData1.AppendRecord([8, 'Строка с длинным текстом 8', now - 2, 110, 'Россия', 'Калининград', 1]);
|
||||
RxMemoryData1.AppendRecord([9, 'Строка с длинным текстом 9', now - 3, 5000, 'Россия', 'Владивасток', 0]);
|
||||
RxMemoryData1.AppendRecord([10,'Строка с длинным текстом 10', now - 4, 123.31, 'USA', 'New-York', 3]);
|
||||
RxMemoryData1.AppendRecord([11,'Строка с длинным текстом 11', now, 100, 'Россия', 'Москва', 2]);
|
||||
RxMemoryData1.AppendRecord([12,'Строка с длинным текстом 12', now - 1, 100, 'Россия', 'Ставрополь', 1]);
|
||||
RxMemoryData1.AppendRecord([13,'Строка с длинным текстом 13', now - 2, 110, 'Россия', 'Калининград', 0]);
|
||||
RxMemoryData1.AppendRecord([14,'Строка с длинным текстом 14', now - 3, 5000, 'Россия', 'Владивасток', 3]);
|
||||
RxMemoryData1.AppendRecord([15,'Строка с длинным текстом 15', now - 4, 123.31, 'USA', 'New-York', 2]);
|
||||
RxMemoryData1.AppendRecord([16,'Строка с длинным текстом 16', now, 100, 'Россия', 'Москва', 1]);
|
||||
RxMemoryData1.AppendRecord([17,'Строка с длинным текстом 17', now - 1, 100, 'Россия', 'Ставрополь', 0]);
|
||||
RxMemoryData1.AppendRecord([18,'Строка с длинным текстом 18', now - 2, 110, 'Россия', 'Калининград', 3]);
|
||||
RxMemoryData1.AppendRecord([19,'Строка с длинным текстом 19', now - 3, 5000, 'Россия', 'Владивасток', 2]);
|
||||
RxMemoryData1.AppendRecord([20,'Строка с длинным текстом 20', now - 4, 123.31, 'USA', 'New-York', 1]);
|
||||
RxMemoryData1.First;
|
||||
|
||||
CreateFontDirList;
|
||||
DebugFonts;
|
||||
end;
|
||||
|
||||
procedure TForm1.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;
|
||||
|
||||
procedure TForm1.InitFonts;
|
||||
begin
|
||||
if FontDirList = nil then
|
||||
CreateFontDirList;
|
||||
end;
|
||||
|
||||
procedure TForm1.ShowInfo(AText: string; AParams: array of const);
|
||||
begin
|
||||
Memo1.Lines.Add(Format(AText, AParams));
|
||||
end;
|
||||
|
||||
procedure TForm1.DebugFonts;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
Memo1.Lines.Clear;
|
||||
gTTFontCache.BuildFontCacheIgnoresErrors:=true;
|
||||
gTTFontCache.SearchPath.Assign(FontDirList);
|
||||
gTTFontCache.BuildFontCache;
|
||||
|
||||
for i:=0 to gTTFontCache.Count-1 do
|
||||
begin
|
||||
ShowInfo('%s - %s - %s', [gTTFontCache.Items[i].FileName, gTTFontCache.Items[i].FamilyName, gTTFontCache.Items[i].PostScriptName]);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.Button1Click(Sender: TObject);
|
||||
begin
|
||||
RxDBGridExportPDF1.ShowSetupForm:=false;
|
||||
RxDBGridExportPDF1.Execute;
|
||||
RxDBGridExportPDF1.ShowSetupForm:=true;
|
||||
end;
|
||||
|
||||
procedure TForm1.CheckBox1Change(Sender: TObject);
|
||||
begin
|
||||
RxDBGridExportPDF1.Enabled:=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'
|
||||
}
|
BIN
RXLib/demos/rxdbgrid/SelectedFont/project1.ico
Normal file
After Width: | Height: | Size: 134 KiB |
83
RXLib/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
RXLib/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.
|
||||
|
434
RXLib/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
RXLib/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.
|
||||
|
BIN
RXLib/demos/rxdbgrid/WordWrap/WordWrapDemo.ico
Normal file
After Width: | Height: | Size: 134 KiB |
80
RXLib/demos/rxdbgrid/WordWrap/WordWrapDemo.lpi
Normal file
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="10"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="WordWrapDemo"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<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="WordWrapDemo.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="WordWrapDemo"/>
|
||||
</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>
|
21
RXLib/demos/rxdbgrid/WordWrap/WordWrapDemo.lpr
Normal file
@@ -0,0 +1,21 @@
|
||||
program WordWrapDemo;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1, rxnew
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
230
RXLib/demos/rxdbgrid/WordWrap/unit1.lfm
Normal file
@@ -0,0 +1,230 @@
|
||||
object Form1: TForm1
|
||||
Left = 585
|
||||
Height = 610
|
||||
Top = 311
|
||||
Width = 874
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 610
|
||||
ClientWidth = 874
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.9.0.0'
|
||||
object RxDBGrid1: TRxDBGrid
|
||||
Left = 0
|
||||
Height = 560
|
||||
Top = 50
|
||||
Width = 874
|
||||
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.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footer.Value = 'Current:'
|
||||
Footer.ValueType = fvtStaticText
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'NAME'
|
||||
Width = 350
|
||||
FieldName = 'NAME'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Пусто)'
|
||||
Filter.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footer.FieldName = 'NAME'
|
||||
Footer.ValueType = fvtFieldValue
|
||||
Footers = <>
|
||||
WordWrap = True
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'CODE'
|
||||
Width = 90
|
||||
FieldName = 'CODE'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Пусто)'
|
||||
Filter.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footer.Alignment = taRightJustify
|
||||
Footer.FieldName = 'CODE'
|
||||
Footer.ValueType = fvtSum
|
||||
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.Active = True
|
||||
FooterOptions.Color = clYellow
|
||||
FooterOptions.RowCount = 1
|
||||
FooterOptions.DrawFullLine = True
|
||||
SearchOptions.QuickSearchOptions = [loCaseInsensitive, loPartialKey]
|
||||
SearchOptions.FromStart = False
|
||||
OnCalcRowHeight = RxDBGrid1CalcRowHeight
|
||||
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgFooterRows, rdgAllowQuickFilter]
|
||||
FooterColor = clYellow
|
||||
FooterRowCount = 1
|
||||
Align = alClient
|
||||
Color = clWindow
|
||||
DrawFullLine = True
|
||||
FocusColor = clRed
|
||||
SelectedColor = clHighlight
|
||||
GridLineStyle = psSolid
|
||||
DataSource = DataSource1
|
||||
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 50
|
||||
Top = 0
|
||||
Width = 874
|
||||
Align = alTop
|
||||
Caption = 'Panel1'
|
||||
ClientHeight = 50
|
||||
ClientWidth = 874
|
||||
TabOrder = 1
|
||||
object CheckBox1: TCheckBox
|
||||
Left = 16
|
||||
Height = 24
|
||||
Top = 8
|
||||
Width = 96
|
||||
Caption = 'Word wrap'
|
||||
Checked = True
|
||||
OnChange = CheckBox1Change
|
||||
State = cbChecked
|
||||
TabOrder = 0
|
||||
end
|
||||
object CheckBox2: TCheckBox
|
||||
Left = 152
|
||||
Height = 24
|
||||
Top = 8
|
||||
Width = 105
|
||||
Caption = 'Show footer'
|
||||
OnChange = CheckBox1Change
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = RxMemoryData1
|
||||
Left = 328
|
||||
Top = 134
|
||||
end
|
||||
object RxMemoryData1: TRxMemoryData
|
||||
FieldDefs = <
|
||||
item
|
||||
Name = 'ID'
|
||||
DataType = ftInteger
|
||||
end
|
||||
item
|
||||
Name = 'NAME'
|
||||
DataType = ftString
|
||||
Size = 500
|
||||
end
|
||||
item
|
||||
Name = 'CODE'
|
||||
DataType = ftInteger
|
||||
end>
|
||||
PacketRecords = 0
|
||||
Left = 360
|
||||
Top = 134
|
||||
object RxMemoryData1ID: TLongintField
|
||||
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 = 500
|
||||
end
|
||||
object RxMemoryData1CODE: TLongintField
|
||||
FieldKind = fkData
|
||||
FieldName = 'CODE'
|
||||
Index = 2
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
end
|
||||
end
|
||||
end
|
99
RXLib/demos/rxdbgrid/WordWrap/unit1.pas
Normal file
@@ -0,0 +1,99 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, rxdbgrid, rxmemds, Forms,
|
||||
Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, db;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
CheckBox1: TCheckBox;
|
||||
CheckBox2: TCheckBox;
|
||||
DataSource1: TDataSource;
|
||||
Panel1: TPanel;
|
||||
RxDBGrid1: TRxDBGrid;
|
||||
RxMemoryData1: TRxMemoryData;
|
||||
RxMemoryData1CODE: TLongintField;
|
||||
RxMemoryData1ID: TLongintField;
|
||||
RxMemoryData1NAME: TStringField;
|
||||
procedure CheckBox1Change(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure RxDBGrid1CalcRowHeight(Sender: TRxDBGrid; var ARowHegth: integer);
|
||||
private
|
||||
procedure FillTestDatabase;
|
||||
public
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
CheckBox1.OnChange := nil;
|
||||
CheckBox2.OnChange := nil;
|
||||
|
||||
CheckBox1.Checked := rdgWordWrap in RxDBGrid1.OptionsRx;
|
||||
CheckBox2.Checked := RxDBGrid1.FooterOptions.Active;
|
||||
|
||||
CheckBox1.OnChange := @CheckBox1Change;
|
||||
CheckBox2.OnChange := @CheckBox1Change;
|
||||
|
||||
RxMemoryData1.Open;
|
||||
FillTestDatabase;
|
||||
end;
|
||||
|
||||
procedure TForm1.RxDBGrid1CalcRowHeight(Sender: TRxDBGrid;
|
||||
var ARowHegth: integer);
|
||||
begin
|
||||
if RxMemoryData1ID.AsInteger mod 10 = 0 then
|
||||
ARowHegth:=ARowHegth + 1;
|
||||
end;
|
||||
|
||||
procedure TForm1.FillTestDatabase;
|
||||
var
|
||||
F:TextFile;
|
||||
S:string;
|
||||
I:integer;
|
||||
begin
|
||||
AssignFile(F, 'unit1.pas');
|
||||
Reset(F);
|
||||
I:=0;
|
||||
while not Eof(F) do
|
||||
begin
|
||||
Readln(F, S);
|
||||
if Trim(S)<>'' then
|
||||
begin
|
||||
RxMemoryData1.AppendRecord([i, S, i]);
|
||||
Inc(i);
|
||||
end;
|
||||
end;
|
||||
CloseFile(F);
|
||||
RxMemoryData1.First;
|
||||
end;
|
||||
|
||||
procedure TForm1.CheckBox1Change(Sender: TObject);
|
||||
begin
|
||||
if CheckBox1.Checked then
|
||||
RxDBGrid1.OptionsRx := RxDBGrid1.OptionsRx + [rdgWordWrap]
|
||||
else
|
||||
RxDBGrid1.OptionsRx := RxDBGrid1.OptionsRx - [rdgWordWrap];
|
||||
|
||||
RxDBGrid1.FooterOptions.Active := CheckBox2.Checked;
|
||||
|
||||
RxMemoryData1.First;
|
||||
end;
|
||||
|
||||
end.
|
||||
|