Стартовый пул
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectSession>
|
||||
<Version Value="10"/>
|
||||
<BuildModes Active="Default"/>
|
||||
<Units Count="5">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<WindowIndex Value="-1"/>
|
||||
<TopLine Value="-1"/>
|
||||
<CursorPos X="-1" Y="-1"/>
|
||||
<UsageCount Value="20"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
<TopLine Value="3"/>
|
||||
<CursorPos Y="52"/>
|
||||
<UsageCount Value="20"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="4301"/>
|
||||
<CursorPos X="3" Y="4266"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<ComponentName Value="RxDBGrid_PopUpFilterForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="RxDBGrid_PopUpFilterUnit"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<TopLine Value="166"/>
|
||||
<CursorPos X="36" Y="177"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="../../../rxdb/rxlookup.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit4>
|
||||
</Units>
|
||||
<JumpHistory Count="11" HistoryIndex="10">
|
||||
<Position1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="39" Column="24" TopLine="8"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="40" Column="24" TopLine="8"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="41" Column="24" TopLine="8"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="42" Column="24" TopLine="8"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="45" Column="24" TopLine="11"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="51" Column="5" TopLine="21"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="52" TopLine="3"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="758" Column="9" TopLine="743"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4170" Column="3" TopLine="4209"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="760" Column="15" TopLine="745"/>
|
||||
</Position11>
|
||||
</JumpHistory>
|
||||
</ProjectSession>
|
||||
</CONFIG>
|
@@ -0,0 +1,22 @@
|
||||
program project1;
|
||||
|
||||
{$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
|
||||
Application.Title:='RxIniPropStorage DEMO';
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
@@ -0,0 +1,106 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, rxdbgrid, rxmemds, RxIniPropStorage, Forms,
|
||||
Controls, Graphics, Dialogs, StdCtrls, db;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
CheckBox1: TCheckBox;
|
||||
DataSource1: TDataSource;
|
||||
Edit1: TEdit;
|
||||
Edit2: TEdit;
|
||||
Label1: TLabel;
|
||||
Memo1: TMemo;
|
||||
RxDBGrid1: TRxDBGrid;
|
||||
RxIniPropStorage1: TRxIniPropStorage;
|
||||
RxMemoryData1: TRxMemoryData;
|
||||
RxMemoryData1CODE: TLongintField;
|
||||
RxMemoryData1ID: TLongintField;
|
||||
RxMemoryData1NAME: TStringField;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure CheckBox1Change(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
procedure RxDBGridInfoBox(Sender: TObject);
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
uses DBGrids;
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
RxDBGrid1.Options:=RxDBGrid1.Options + [dgAlwaysShowEditor];
|
||||
RxMemoryData1.Open;
|
||||
for i:=1 to 20 do
|
||||
begin
|
||||
RxMemoryData1.Append;
|
||||
RxMemoryData1ID.AsInteger:=i;
|
||||
RxMemoryData1NAME.AsString:='Line '+IntToStr(I);
|
||||
if i mod 4 = 0 then
|
||||
RxMemoryData1CODE.Clear
|
||||
else
|
||||
RxMemoryData1CODE.AsInteger:=100 + i * 10;
|
||||
RxMemoryData1.Post;
|
||||
|
||||
end;
|
||||
RxDBGrid1.CreateToolMenuItem(#0, '-', nil);
|
||||
RxDBGrid1.CreateToolMenuItem(#0, 'Show info box', @RxDBGridInfoBox);
|
||||
// RxDBGrid1.DefaultRowHeight:=;
|
||||
end;
|
||||
|
||||
procedure TForm1.RxDBGridInfoBox(Sender: TObject);
|
||||
begin
|
||||
ShowMessage('Hello world form RXDBGrid tools menu');
|
||||
end;
|
||||
|
||||
procedure TForm1.CheckBox1Change(Sender: TObject);
|
||||
begin
|
||||
Edit1.Enabled:=not CheckBox1.Checked;
|
||||
|
||||
try
|
||||
if CheckBox1.Checked then
|
||||
RxMemoryData1.Filter:=Edit1.Text;
|
||||
RxMemoryData1.Filtered:=CheckBox1.Checked;
|
||||
except
|
||||
on E:Exception do
|
||||
Memo1.Lines.Text:=E.Message;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.Button2Click(Sender: TObject);
|
||||
begin
|
||||
RxDBGrid1.DefaultRowHeight:=StrToInt(Edit2.Text);
|
||||
end;
|
||||
|
||||
type
|
||||
THackGrid = class(TRxDBGrid);
|
||||
|
||||
procedure TForm1.Button1Click(Sender: TObject);
|
||||
begin
|
||||
RxDBGrid1.DefaultRowHeight:=THackGrid(RxDBGrid1).GetDefaultRowHeight;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user