Стартовый пул
This commit is contained in:
BIN
RXLib/demos/RxLookup/project1.ico
Normal file
BIN
RXLib/demos/RxLookup/project1.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
270
RXLib/demos/RxLookup/project1.lpi
Normal file
270
RXLib/demos/RxLookup/project1.lpi
Normal file
@@ -0,0 +1,270 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<General>
|
||||
<MainUnit Value="0"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<Language Value=""/>
|
||||
<CharSet Value=""/>
|
||||
</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"/>
|
||||
</Modes>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="3">
|
||||
<Item1>
|
||||
<PackageName Value="FCL"/>
|
||||
<MinVersion Major="1" Valid="True"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="rxnew"/>
|
||||
<MinVersion Major="2" Minor="1" Release="1" Build="103" Valid="True"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item3>
|
||||
</RequiredPackages>
|
||||
<Units Count="15">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<CursorPos Y="18"/>
|
||||
<UsageCount Value="24"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
<TopLine Value="16"/>
|
||||
<CursorPos X="23" Y="74"/>
|
||||
<UsageCount Value="24"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="../../rxlookup.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="645"/>
|
||||
<CursorPos X="19" Y="646"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 Y="1315" ID="1"/>
|
||||
</Bookmarks>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="../../../../lcl/controls.pp"/>
|
||||
<UnitName Value="Controls"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<TopLine Value="1276"/>
|
||||
<CursorPos X="15" Y="1294"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="../../../../lcl/include/control.inc"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<TopLine Value="3771"/>
|
||||
<CursorPos X="3" Y="3778"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="../../rxpopupunit.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="770"/>
|
||||
<CursorPos Y="785"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="../../rxdconst.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="68"/>
|
||||
<CursorPos X="3" Y="68"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="../../../../lcl/include/wincontrol.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="7563"/>
|
||||
<CursorPos Y="7579"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="../../dbutils.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="310"/>
|
||||
<CursorPos Y="326"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="/home/install/source/fpcsrc/packages/fcl-db/src/base/db.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="547"/>
|
||||
<CursorPos X="3" Y="566"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="../../rxdb/rxlookup.pas"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="1466"/>
|
||||
<CursorPos X="2" Y="1471"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="../../registerrx.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="../../registerrxdb.pas"/>
|
||||
<UnitName Value="RegisterRxDB"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="118"/>
|
||||
<CursorPos X="36" Y="155"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
<Filename Value="../../rxdb/rxdbgridexportpdf.pas"/>
|
||||
<UnitName Value="RxDBGridExportPdf"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="183"/>
|
||||
<CursorPos X="3" Y="196"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit13>
|
||||
<Unit14>
|
||||
<Filename Value="../../rxdb/rxdbgridexportpdfsetupunit.pas"/>
|
||||
<ComponentName Value="RxDBGridExportPdfSetupForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="RxDBGridExportPdfSetupUnit"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="83"/>
|
||||
<CursorPos X="31" Y="98"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit14>
|
||||
</Units>
|
||||
<JumpHistory Count="16" HistoryIndex="15">
|
||||
<Position1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="47" TopLine="34"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="61" Column="14" TopLine="37"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="25" Column="5" TopLine="9"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="12" Column="37" TopLine="9"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="26" Column="21" TopLine="9"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="27" Column="21" TopLine="9"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="64" Column="43" TopLine="52"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="65" Column="43" TopLine="53"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="69" Column="45" TopLine="51"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="74" Column="29" TopLine="40"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="51" Column="38" TopLine="40"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="52" Column="38" TopLine="41"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="62" Column="14" TopLine="57"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="74" Column="23" TopLine="16"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="../../rxdb/rxlookup.pas"/>
|
||||
<Caret Line="334" Column="3" TopLine="315"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="../../rxdb/rxlookup.pas"/>
|
||||
<Caret Line="277" Column="30" TopLine="259"/>
|
||||
</Position16>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<Target>
|
||||
<Filename Value="project1"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<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>
|
19
RXLib/demos/RxLookup/project1.lpr
Normal file
19
RXLib/demos/RxLookup/project1.lpr
Normal file
@@ -0,0 +1,19 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1, rxnew;
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
300
RXLib/demos/RxLookup/unit1.lfm
Normal file
300
RXLib/demos/RxLookup/unit1.lfm
Normal file
@@ -0,0 +1,300 @@
|
||||
object Form1: TForm1
|
||||
Left = 534
|
||||
Height = 368
|
||||
Top = 234
|
||||
Width = 498
|
||||
ActiveControl = RxDBLookupCombo1
|
||||
Caption = 'RxDBLookupCombo test'
|
||||
ClientHeight = 368
|
||||
ClientWidth = 498
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.9.0.0'
|
||||
object Label1: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = GroupBox1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 102
|
||||
Width = 67
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Select item...'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
AnchorSideLeft.Control = Button1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Button1
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 103
|
||||
Height = 15
|
||||
Top = 161
|
||||
Width = 34
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Label2'
|
||||
ParentColor = False
|
||||
end
|
||||
object RxDBLookupCombo1: TRxDBLookupCombo
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = Label1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 12
|
||||
Height = 27
|
||||
Top = 123
|
||||
Width = 480
|
||||
AutoSize = True
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
ButtonOnlyWhenFocused = False
|
||||
ButtonWidth = 15
|
||||
Color = clWindow
|
||||
DataField = 'ID'
|
||||
DataSource = dsData1
|
||||
PopUpFormOptions.Columns = <>
|
||||
Flat = False
|
||||
Glyph.Data = {
|
||||
72000000424D7200000000000000360000002800000005000000030000000100
|
||||
2000000000003C00000064000000640000000000000000000000000000000000
|
||||
0000000000FF000000000000000000000000000000FF000000FF000000FF0000
|
||||
0000000000FF000000FF000000FF000000FF000000FF
|
||||
}
|
||||
NumGlyphs = 1
|
||||
ParentColor = False
|
||||
ReadOnly = False
|
||||
TabOrder = 0
|
||||
TabStop = True
|
||||
DisplayAllFields = True
|
||||
LookupDisplay = 'ID;Price;Caption'
|
||||
LookupDisplayIndex = 2
|
||||
LookupField = 'ID'
|
||||
LookupSource = dsLookUpData
|
||||
end
|
||||
object Button1: TButton
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = RxDBLookupCombo1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 25
|
||||
Top = 156
|
||||
Width = 91
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Test caption'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 1
|
||||
end
|
||||
object Button2: TButton
|
||||
AnchorSideTop.Control = Button1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 428
|
||||
Height = 25
|
||||
Top = 187
|
||||
Width = 64
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Set text'
|
||||
OnClick = Button2Click
|
||||
TabOrder = 2
|
||||
end
|
||||
object Edit1: TEdit
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Button1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Button2
|
||||
Left = 6
|
||||
Height = 23
|
||||
Top = 187
|
||||
Width = 416
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
TabOrder = 3
|
||||
Text = 'Edit1'
|
||||
end
|
||||
object DBGrid1: TDBGrid
|
||||
AnchorSideTop.Control = Edit1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 152
|
||||
Top = 216
|
||||
Width = 498
|
||||
Align = alBottom
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
Color = clWindow
|
||||
Columns = <>
|
||||
DataSource = dsLookUpData
|
||||
TabOrder = 4
|
||||
end
|
||||
object GroupBox1: TGroupBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 90
|
||||
Top = 6
|
||||
Width = 486
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'RxDBLookupCombo visual options'
|
||||
ClientHeight = 70
|
||||
ClientWidth = 482
|
||||
TabOrder = 5
|
||||
object CheckBox1: TCheckBox
|
||||
AnchorSideLeft.Control = GroupBox1
|
||||
AnchorSideTop.Control = GroupBox1
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 6
|
||||
Width = 39
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Flat'
|
||||
OnChange = CheckBox1Change
|
||||
TabOrder = 0
|
||||
end
|
||||
object RadioGroup1: TRadioGroup
|
||||
AnchorSideLeft.Control = CheckBox1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = GroupBox1
|
||||
Left = 51
|
||||
Height = 58
|
||||
Top = 6
|
||||
Width = 81
|
||||
AutoFill = True
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Border style'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 38
|
||||
ClientWidth = 77
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'bsNone'
|
||||
'bsSingle'
|
||||
)
|
||||
OnClick = CheckBox1Change
|
||||
TabOrder = 1
|
||||
end
|
||||
object RadioGroup2: TRadioGroup
|
||||
AnchorSideLeft.Control = GroupBox1
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
AnchorSideTop.Control = GroupBox1
|
||||
Left = 176
|
||||
Height = 58
|
||||
Top = 6
|
||||
Width = 131
|
||||
AutoFill = True
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Style'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 38
|
||||
ClientWidth = 127
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'rxcsDropDown'
|
||||
'rxcsDropDownList'
|
||||
)
|
||||
OnClick = CheckBox1Change
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object rxData1: TRxMemoryData
|
||||
FieldDefs = <
|
||||
item
|
||||
Name = 'ID'
|
||||
DataType = ftInteger
|
||||
end>
|
||||
PacketRecords = 0
|
||||
Left = 320
|
||||
Top = 8
|
||||
object rxData1ID: TLongintField
|
||||
DisplayWidth = 10
|
||||
FieldKind = fkData
|
||||
FieldName = 'ID'
|
||||
Index = 0
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
end
|
||||
end
|
||||
object rxLookUpData: TRxMemoryData
|
||||
FieldDefs = <
|
||||
item
|
||||
Name = 'ID'
|
||||
DataType = ftInteger
|
||||
end
|
||||
item
|
||||
Name = 'Caption'
|
||||
DataType = ftString
|
||||
Size = 100
|
||||
end
|
||||
item
|
||||
Name = 'Price'
|
||||
DataType = ftCurrency
|
||||
end>
|
||||
PacketRecords = 0
|
||||
Left = 232
|
||||
Top = 128
|
||||
object rxLookUpDataID: TLongintField
|
||||
DisplayWidth = 10
|
||||
FieldKind = fkData
|
||||
FieldName = 'ID'
|
||||
Index = 0
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
end
|
||||
object rxLookUpDataCaption: TStringField
|
||||
DisplayWidth = 100
|
||||
FieldKind = fkData
|
||||
FieldName = 'Caption'
|
||||
Index = 1
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
Size = 100
|
||||
end
|
||||
object rxLookUpDataPrice: TCurrencyField
|
||||
DisplayWidth = 10
|
||||
FieldKind = fkData
|
||||
FieldName = 'Price'
|
||||
Index = 2
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
Precision = 2
|
||||
end
|
||||
end
|
||||
object dsData1: TDataSource
|
||||
DataSet = rxData1
|
||||
Left = 288
|
||||
Top = 8
|
||||
end
|
||||
object dsLookUpData: TDataSource
|
||||
DataSet = rxLookUpData
|
||||
Left = 200
|
||||
Top = 128
|
||||
end
|
||||
end
|
95
RXLib/demos/RxLookup/unit1.pas
Normal file
95
RXLib/demos/RxLookup/unit1.pas
Normal file
@@ -0,0 +1,95 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, db, FileUtil, LResources, Forms, Controls, Graphics,
|
||||
Dialogs, StdCtrls, DBGrids, ExtCtrls, rxlookup, rxmemds;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
CheckBox1: TCheckBox;
|
||||
DBGrid1: TDBGrid;
|
||||
dsData1: TDatasource;
|
||||
dsLookUpData: TDatasource;
|
||||
Edit1: TEdit;
|
||||
GroupBox1: TGroupBox;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
RadioGroup1: TRadioGroup;
|
||||
RadioGroup2: TRadioGroup;
|
||||
rxData1ID: TLongintField;
|
||||
RxDBLookupCombo1: TRxDBLookupCombo;
|
||||
rxData1: TRxMemoryData;
|
||||
rxLookUpData: TRxMemoryData;
|
||||
rxLookUpDataCaption: TStringField;
|
||||
rxLookUpDataID: TLongintField;
|
||||
rxLookUpDataPrice: TCurrencyField;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure CheckBox1Change(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.Button1Click(Sender: TObject);
|
||||
begin
|
||||
Label2.Caption:=RxDBLookupCombo1.Text;
|
||||
end;
|
||||
|
||||
procedure TForm1.Button2Click(Sender: TObject);
|
||||
begin
|
||||
RxDBLookupCombo1.Text:=Edit1.Text;
|
||||
end;
|
||||
|
||||
procedure TForm1.CheckBox1Change(Sender: TObject);
|
||||
begin
|
||||
RxDBLookupCombo1.Flat:=CheckBox1.Checked;
|
||||
|
||||
case RadioGroup1.ItemIndex of
|
||||
0:RxDBLookupCombo1.BorderStyle:=bsNone;
|
||||
1:RxDBLookupCombo1.BorderStyle:=bsSingle;
|
||||
end;
|
||||
|
||||
case RadioGroup2.ItemIndex of
|
||||
0:RxDBLookupCombo1.Style:=rxcsDropDown;
|
||||
1:RxDBLookupCombo1.Style:=rxcsDropDownList;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
rxData1.Open;
|
||||
rxData1.Append;
|
||||
rxLookUpData.Open;
|
||||
rxLookUpData.AppendRecord([1, 'Lazarus', 0]);
|
||||
rxLookUpData.AppendRecord([2, 'Delphi', 1000]);
|
||||
rxLookUpData.AppendRecord([3, 'MS Office', 400]);
|
||||
rxLookUpData.AppendRecord([4, 'MS Windows XP', 150]);
|
||||
rxLookUpData.AppendRecord([5, 'MS Windows Vista', 100]);
|
||||
rxLookUpData.AppendRecord([6, 'MS Windows 7', 200]);
|
||||
rxLookUpData.AppendRecord([7, 'Fedora Linux 11 - 27', 0]);
|
||||
Label2.Caption:='';
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user