You've already forked lazarus-ccr
+ New component - TRxDateEdit
+ In RxDBGrid create editor for field with type ftDate, ftDateTime - based on TRxDateEdit (see Demos/RxDBGrid) - minor fix in filter combobox in RxDBGrid for GTK and GTK2 git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@334 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="5"/>
|
||||
<PathDelim Value="/"/>
|
||||
<Version Value="6"/>
|
||||
<General>
|
||||
<MainUnit Value="0"/>
|
||||
<IconPath Value="./"/>
|
||||
<TargetFileExt Value=".exe"/>
|
||||
<ActiveEditorIndexAtStart Value="0"/>
|
||||
<ActiveEditorIndexAtStart Value="3"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
@ -28,27 +28,25 @@
|
||||
</RunParams>
|
||||
<RequiredPackages Count="3">
|
||||
<Item1>
|
||||
<PackageName Value="rxnew"/>
|
||||
<MinVersion Major="1" Release="18" Build="56" Valid="True"/>
|
||||
<PackageName Value="FCL"/>
|
||||
<MinVersion Major="1" Valid="True"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="FCL"/>
|
||||
<MinVersion Major="1" Valid="True"/>
|
||||
<PackageName Value="rxnew"/>
|
||||
<MinVersion Major="1" Release="18" Build="56" Valid="True"/>
|
||||
</Item3>
|
||||
</RequiredPackages>
|
||||
<Units Count="9">
|
||||
<Units Count="14">
|
||||
<Unit0>
|
||||
<Filename Value="RxDBGridDemo.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="RxDBGridDemo"/>
|
||||
<CursorPos X="3" Y="11"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="22"/>
|
||||
<Loaded Value="True"/>
|
||||
<UsageCount Value="24"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
@ -56,106 +54,234 @@
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="rxdbgridmainunit.lrs"/>
|
||||
<UnitName Value="RxDBGridMainUnit"/>
|
||||
<CursorPos X="37" Y="33"/>
|
||||
<TopLine Value="33"/>
|
||||
<CursorPos X="24" Y="53"/>
|
||||
<TopLine Value="9"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="22"/>
|
||||
<UsageCount Value="24"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="..\..\..\..\fpcsrc\fcl\db\db.pp"/>
|
||||
<Filename Value="../../../../fpcsrc/fcl/db/db.pp"/>
|
||||
<UnitName Value="db"/>
|
||||
<CursorPos X="17" Y="1116"/>
|
||||
<TopLine Value="1112"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="..\..\..\..\fpcsrc\fcl\db\dataset.inc"/>
|
||||
<Filename Value="../../../../fpcsrc/fcl/db/dataset.inc"/>
|
||||
<CursorPos X="21" Y="1139"/>
|
||||
<TopLine Value="1134"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="..\..\rxmemds.pas"/>
|
||||
<Filename Value="../../rxmemds.pas"/>
|
||||
<UnitName Value="rxmemds"/>
|
||||
<CursorPos X="1" Y="356"/>
|
||||
<TopLine Value="337"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="..\..\rxdbgrid.pas"/>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<UnitName Value="rxdbgrid"/>
|
||||
<CursorPos X="13" Y="626"/>
|
||||
<TopLine Value="608"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="12"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="3" Y="1444" ID="1"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="..\..\..\..\lcl\lresources.pp"/>
|
||||
<Filename Value="../../../../lcl/lresources.pp"/>
|
||||
<UnitName Value="LResources"/>
|
||||
<CursorPos X="1" Y="2644"/>
|
||||
<TopLine Value="2626"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="..\..\..\..\lcl\grids.pas"/>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<UnitName Value="Grids"/>
|
||||
<CursorPos X="60" Y="68"/>
|
||||
<TopLine Value="58"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="..\..\..\..\lcl\dbgrids.pas"/>
|
||||
<Filename Value="../../../../lcl/dbgrids.pas"/>
|
||||
<UnitName Value="DBGrids"/>
|
||||
<CursorPos X="14" Y="455"/>
|
||||
<TopLine Value="437"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<UnitName Value="rxdbgrid"/>
|
||||
<CursorPos X="3" Y="1466"/>
|
||||
<TopLine Value="1436"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxmemds.pas"/>
|
||||
<UnitName Value="rxmemds"/>
|
||||
<CursorPos X="1" Y="1335"/>
|
||||
<TopLine Value="1312"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit8>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxpopupunit.pas"/>
|
||||
<UnitName Value="rxpopupunit"/>
|
||||
<CursorPos X="15" Y="249"/>
|
||||
<TopLine Value="246"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<UnitName Value="Grids"/>
|
||||
<CursorPos X="15" Y="854"/>
|
||||
<TopLine Value="831"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/dbgrids.pas"/>
|
||||
<UnitName Value="DBGrids"/>
|
||||
<CursorPos X="14" Y="450"/>
|
||||
<TopLine Value="427"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit13>
|
||||
</Units>
|
||||
<JumpHistory Count="7" HistoryIndex="6">
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
<Caret Line="70" Column="78" TopLine="37"/>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="226" Column="22" TopLine="203"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
<Caret Line="34" Column="36" TopLine="33"/>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="280" Column="32" TopLine="257"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
<Caret Line="52" Column="1" TopLine="40"/>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="281" Column="32" TopLine="258"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
<Caret Line="60" Column="1" TopLine="41"/>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1465" Column="1" TopLine="1434"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
<Caret Line="61" Column="1" TopLine="42"/>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1708" Column="38" TopLine="1685"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
<Caret Line="60" Column="1" TopLine="42"/>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1710" Column="20" TopLine="1687"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
<Caret Line="33" Column="37" TopLine="33"/>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1711" Column="61" TopLine="1688"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1713" Column="25" TopLine="1690"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1716" Column="33" TopLine="1693"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1722" Column="38" TopLine="1699"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1724" Column="20" TopLine="1701"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1725" Column="20" TopLine="1702"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1909" Column="1" TopLine="1880"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1911" Column="35" TopLine="1888"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1912" Column="36" TopLine="1889"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1903" Column="32" TopLine="1893"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
<Caret Line="52" Column="18" TopLine="9"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="2343" Column="35" TopLine="2336"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="2339" Column="37" TopLine="2336"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="2338" Column="37" TopLine="2315"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1942" Column="25" TopLine="1919"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1947" Column="25" TopLine="1924"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="2338" Column="37" TopLine="2315"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1942" Column="25" TopLine="1919"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1947" Column="25" TopLine="1924"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||
<Caret Line="1468" Column="14" TopLine="1436"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
<Caret Line="15" Column="4" TopLine="9"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="5"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<SrcPath Value="$(LazarusDir)\lcl\;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType)\"/>
|
||||
<SrcPath Value="$(LazarusDir)/lcl/;$(LazarusDir)/lcl/interfaces/$(LCLWidgetType)/"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<Generate Value="Faster"/>
|
||||
@ -172,16 +298,6 @@
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<BreakPoints Count="2">
|
||||
<Item1>
|
||||
<Source Value="..\..\rxlookup.pas"/>
|
||||
<Line Value="1013"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Source Value="..\..\rxpopupunit.pas"/>
|
||||
<Line Value="267"/>
|
||||
</Item2>
|
||||
</BreakPoints>
|
||||
<Watches Count="1">
|
||||
<Item1>
|
||||
<Expression Value="W"/>
|
||||
|
@ -1,19 +1,19 @@
|
||||
object RxDBGridMainForm: TRxDBGridMainForm
|
||||
Left = 353
|
||||
Left = 301
|
||||
Height = 582
|
||||
Top = 161
|
||||
Width = 859
|
||||
HorzScrollBar.Page = 858
|
||||
Width = 969
|
||||
HorzScrollBar.Page = 968
|
||||
VertScrollBar.Page = 581
|
||||
ActiveControl = RxDBGrid1
|
||||
Caption = 'RxDBGrid Demo (ver 2) ...'
|
||||
Caption = 'RxDBGrid Demo (ver 3) ...'
|
||||
ClientHeight = 582
|
||||
ClientWidth = 859
|
||||
ClientWidth = 969
|
||||
OnCreate = FormCreate
|
||||
object RxDBGrid1: TRxDBGrid
|
||||
Height = 532
|
||||
Top = 50
|
||||
Width = 859
|
||||
Width = 969
|
||||
Columns = <
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
@ -28,7 +28,7 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Caption = 'Software Name'
|
||||
Width = 450
|
||||
Width = 350
|
||||
FieldName = 'NAME'
|
||||
Filter.Color = clLime
|
||||
Filter.ItemIndex = -1
|
||||
@ -52,6 +52,19 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
Footer.ValueType = fvtSum
|
||||
Filter.Color = clLime
|
||||
Filter.ItemIndex = -1
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Caption = 'Date Present'
|
||||
Width = 100
|
||||
FieldName = 'Date_Present'
|
||||
Filter.ItemIndex = -1
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Width = 150
|
||||
FieldName = 'DEVELOPER_ID'
|
||||
Filter.ItemIndex = -1
|
||||
end>
|
||||
OptionsRx = [rdgFooterRows]
|
||||
FooterColor = clYellow
|
||||
@ -66,16 +79,15 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
OptionsExtra = [dgeAutoColumns, dgeCheckboxColumn]
|
||||
ParentColor = False
|
||||
PopupMenu = PopupMenu1
|
||||
Scrollbars = ssBoth
|
||||
TabOrder = 0
|
||||
TabStop = True
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Height = 50
|
||||
Width = 859
|
||||
Width = 969
|
||||
Align = alTop
|
||||
ClientHeight = 50
|
||||
ClientWidth = 859
|
||||
ClientWidth = 969
|
||||
TabOrder = 1
|
||||
object Button1: TButton
|
||||
Left = 8
|
||||
@ -97,9 +109,9 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
Left = 241
|
||||
Height = 13
|
||||
Height = 20
|
||||
Top = 8
|
||||
Width = 61
|
||||
Width = 75
|
||||
Caption = 'Use filter'
|
||||
OnChange = CheckBox1Change
|
||||
TabOrder = 2
|
||||
@ -131,6 +143,14 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
DataType = ftString
|
||||
Precision = -1
|
||||
Size = 150
|
||||
end
|
||||
item
|
||||
Name = 'Date_Present'
|
||||
DataType = ftDate
|
||||
end
|
||||
item
|
||||
Name = 'DEVELOPER_ID'
|
||||
DataType = ftInteger
|
||||
end>
|
||||
OnFilterRecordEx = RxMemoryData1FilterRecordEx
|
||||
left = 152
|
||||
@ -164,6 +184,23 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
Size = 150
|
||||
end
|
||||
object RxMemoryData1Date_Present1: TDateField
|
||||
DisplayWidth = 10
|
||||
FieldName = 'Date_Present'
|
||||
Index = 4
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
end
|
||||
object RxMemoryData1DEVELOPER_ID1: TLongintField
|
||||
AlignMent = taRightJustify
|
||||
DisplayWidth = 10
|
||||
FieldName = 'DEVELOPER_ID'
|
||||
Index = 5
|
||||
LookupDataSet = RxMemoryData2
|
||||
LookupKeyFields = 'DEVELOPER_ID'
|
||||
LookupResultField = 'DEVELOPER_NAME'
|
||||
KeyFields = 'DEVELOPER_ID'
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
end
|
||||
end
|
||||
object Datasource1: TDatasource
|
||||
DataSet = RxMemoryData1
|
||||
@ -208,4 +245,36 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
OnExecute = actOptimizeWidthCol1Execute
|
||||
end
|
||||
end
|
||||
object Datasource2: TDatasource
|
||||
DataSet = RxMemoryData2
|
||||
left = 207
|
||||
top = 264
|
||||
end
|
||||
object RxMemoryData2: TRxMemoryData
|
||||
FieldDefs = <
|
||||
item
|
||||
Name = 'DEVELOPER_ID'
|
||||
DataType = ftInteger
|
||||
end
|
||||
item
|
||||
Name = 'DEVELOPER_NAME'
|
||||
DataType = ftString
|
||||
Size = 130
|
||||
end>
|
||||
left = 240
|
||||
top = 264
|
||||
object RxMemoryData2DEVELOPER_ID1: TLongintField
|
||||
AlignMent = taRightJustify
|
||||
DisplayWidth = 10
|
||||
FieldName = 'DEVELOPER_ID'
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
end
|
||||
object RxMemoryData2DEVELOPER_NAME1: TStringField
|
||||
DisplayWidth = 130
|
||||
FieldName = 'DEVELOPER_NAME'
|
||||
Index = 1
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
Size = 130
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,69 +1,90 @@
|
||||
{ ��� - ���� ��������, ������������� ��������� lazarus }
|
||||
|
||||
LazarusResources.Add('TRxDBGridMainForm','FORMDATA',[
|
||||
'TPF0'#17'TRxDBGridMainForm'#16'RxDBGridMainForm'#4'Left'#3'a'#1#6'Height'#3
|
||||
+'F'#2#3'Top'#3#161#0#5'Width'#3'['#3#18'HorzScrollBar.Page'#3'Z'#3#18'VertSc'
|
||||
+'rollBar.Page'#3'E'#2#13'ActiveControl'#7#9'RxDBGrid1'#7'Caption'#6#26'RxDBG'
|
||||
+'rid Demo (ver 2) ...'#12'ClientHeight'#3'F'#2#11'ClientWidth'#3'['#3#8'OnC'
|
||||
+'reate'#7#10'FormCreate'#0#9'TRxDBGrid'#9'RxDBGrid1'#6'Height'#3#20#2#3'Top'
|
||||
+#2'2'#5'Width'#3'['#3#7'Columns'#14#1#15'Title.Alignment'#7#8'taCenter'#13'T'
|
||||
+'itle.Caption'#6#4'Code'#9'FieldName'#6#2'ID'#16'Footer.Alignment'#7#14'taRi'
|
||||
+'ghtJustify'#20'Footer.DisplayFormat'#6#9'Count: %d'#16'Footer.ValueType'#7#8
|
||||
+'fvtCount'#12'Filter.Color'#7#6'clLime'#16'Filter.ItemIndex'#2#255#0#1#15'Ti'
|
||||
+'tle.Alignment'#7#8'taCenter'#13'Title.Caption'#6#13'Software Name'#5'Width'
|
||||
+#3#194#1#9'FieldName'#6#4'NAME'#12'Filter.Color'#7#6'clLime'#16'Filter.ItemI'
|
||||
+'ndex'#2#255#0#1#15'Title.Alignment'#7#8'taCenter'#5'Width'#3#150#0#9'FieldN'
|
||||
+'ame'#6#9'Developer'#12'Filter.Color'#7#6'clLime'#16'Filter.ItemIndex'#2#255
|
||||
+#0#1#15'Title.Alignment'#7#8'taCenter'#13'Title.Caption'#6#4'Cost'#5'Width'#2
|
||||
+'Z'#9'FieldName'#6#5'PRICE'#13'DisplayFormat'#6#8'#,##0.00'#16'Footer.Alignm'
|
||||
+'ent'#7#14'taRightJustify'#20'Footer.DisplayFormat'#6#8'#,##0.00'#16'Footer.'
|
||||
+'FieldName'#6#5'PRICE'#16'Footer.ValueType'#7#6'fvtSum'#12'Filter.Color'#7#6
|
||||
+'clLime'#16'Filter.ItemIndex'#2#255#0#0#9'OptionsRx'#11#13'rdgFooterRows'#0
|
||||
+#11'FooterColor'#7#8'clYellow'#14'FooterRowCount'#2#1#9'OnFiltred'#7#16'RxDB'
|
||||
+'Grid1Filtred'#5'Align'#7#8'alClient'#10'FocusColor'#7#5'clRed'#13'SelectedC'
|
||||
+'olor'#7#11'clHighlight'#10'DataSource'#7#11'Datasource1'#10'FixedColor'#7#9
|
||||
+'clBtnFace'#7'Options'#11#9'dgEditing'#8'dgTitles'#11'dgIndicator'#14'dgColu'
|
||||
+'mnResize'#12'dgColumnMove'#10'dgColLines'#10'dgRowLines'#6'dgTabs'#21'dgAlw'
|
||||
+'aysShowSelection'#15'dgConfirmDelete'#14'dgCancelOnExit'#13'dgMultiselect'#0
|
||||
+#12'OptionsExtra'#11#14'dgeAutoColumns'#17'dgeCheckboxColumn'#0#11'ParentCol'
|
||||
+'or'#8#9'PopupMenu'#7#10'PopupMenu1'#10'Scrollbars'#7#6'ssBoth'#8'TabOrder'#2
|
||||
+#0#7'TabStop'#9#0#0#6'TPanel'#6'Panel1'#6'Height'#2'2'#5'Width'#3'['#3#5'Ali'
|
||||
+'gn'#7#5'alTop'#12'ClientHeight'#2'2'#11'ClientWidth'#3'['#3#8'TabOrder'#2#1
|
||||
+#0#7'TButton'#7'Button1'#4'Left'#2#8#6'Height'#2#25#3'Top'#2#8#5'Width'#2'K'
|
||||
+#6'Action'#7#12'actCalcTotal'#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2
|
||||
+#0#0#0#7'TButton'#7'Button2'#4'Left'#2'X'#6'Height'#2#25#3'Top'#2#8#5'Width'
|
||||
+#3#136#0#6'Action'#7#26'actOptimizeColumnsWidthAll'#25'BorderSpacing.InnerBo'
|
||||
+'rder'#2#4#8'TabOrder'#2#1#0#0#9'TCheckBox'#9'CheckBox1'#4'Left'#3#241#0#6'H'
|
||||
+'eight'#2#13#3'Top'#2#8#5'Width'#2'='#7'Caption'#6#10'Use filter'#8'OnChange'
|
||||
+#7#15'CheckBox1Change'#8'TabOrder'#2#2#11'UseOnChange'#9#0#0#0#13'TRxMemoryD'
|
||||
+'ata'#13'RxMemoryData1'#9'FieldDefs'#14#1#4'Name'#6#2'ID'#8'DataType'#7#9'ft'
|
||||
+'Integer'#9'Precision'#2#255#4'Size'#2#7#0#1#4'Name'#6#4'NAME'#8'DataType'#7
|
||||
+#8'ftString'#9'Precision'#2#255#4'Size'#3#150#0#0#1#4'Name'#6#5'PRICE'#8'Dat'
|
||||
+'aType'#7#7'ftFloat'#9'Precision'#2#2#4'Size'#2#12#0#1#4'Name'#6#9'Developer'
|
||||
+#8'DataType'#7#8'ftString'#9'Precision'#2#255#4'Size'#3#150#0#0#0#16'OnFilte'
|
||||
+'rRecordEx'#7#27'RxMemoryData1FilterRecordEx'#4'left'#3#152#0#3'top'#3#8#1#0
|
||||
+#13'TLongintField'#16'RxMemoryData1ID1'#9'AlignMent'#7#14'taRightJustify'#12
|
||||
+'DisplayWidth'#2#10#9'FieldName'#6#2'ID'#13'ProviderFlags'#11#10'pfInUpdate'
|
||||
+#9'pfInWhere'#0#0#0#12'TStringField'#18'RxMemoryData1NAME1'#12'DisplayWidth'
|
||||
+#3#150#0#9'FieldName'#6#4'NAME'#5'Index'#2#1#13'ProviderFlags'#11#10'pfInUpd'
|
||||
+'ate'#9'pfInWhere'#0#4'Size'#3#150#0#0#0#11'TFloatField'#19'RxMemoryData1PRI'
|
||||
+'CE1'#9'AlignMent'#7#14'taRightJustify'#12'DisplayWidth'#2#10#9'FieldName'#6
|
||||
+#5'PRICE'#5'Index'#2#2#13'ProviderFlags'#11#10'pfInUpdate'#9'pfInWhere'#0#13
|
||||
+'DisplayFormat'#6#8'#,##0.00'#9'Precision'#2#2#0#0#12'TStringField'#23'RxMem'
|
||||
+'oryData1Developer1'#12'DisplayWidth'#3#150#0#9'FieldName'#6#9'Developer'#5
|
||||
+'Index'#2#3#13'ProviderFlags'#11#10'pfInUpdate'#9'pfInWhere'#0#4'Size'#3#150
|
||||
+#0#0#0#0#11'TDatasource'#11'Datasource1'#7'DataSet'#7#13'RxMemoryData1'#4'le'
|
||||
+'ft'#2'x'#3'top'#3#8#1#0#0#10'TPopupMenu'#10'PopupMenu1'#4'left'#3#152#0#3't'
|
||||
+'op'#3#197#0#0#9'TMenuItem'#9'MenuItem1'#6'Action'#7#20'actOptimizeWidthCol1'
|
||||
+#7'OnClick'#7#27'actOptimizeWidthCol1Execute'#0#0#9'TMenuItem'#9'MenuItem2'#7
|
||||
+'Caption'#6#1'-'#0#0#9'TMenuItem'#9'MenuItem4'#6'Action'#7#12'actCalcTotal'#7
|
||||
+'OnClick'#7#19'actCalcTotalExecute'#0#0#9'TMenuItem'#9'MenuItem3'#6'Action'#7
|
||||
+#26'actOptimizeColumnsWidthAll'#7'OnClick'#7'!actOptimizeColumnsWidthAllExec'
|
||||
+'ute'#0#0#0#11'TActionList'#11'ActionList1'#4'left'#3#206#0#3'top'#3#197#0#0
|
||||
+#7'TAction'#12'actCalcTotal'#7'Caption'#6#13'Calc total...'#18'DisableIfNoHa'
|
||||
+'ndler'#9#9'OnExecute'#7#19'actCalcTotalExecute'#0#0#7'TAction'#26'actOptimi'
|
||||
+'zeColumnsWidthAll'#7'Caption'#6#25'Optimize width for all...'#18'DisableIfN'
|
||||
+'oHandler'#9#9'OnExecute'#7'!actOptimizeColumnsWidthAllExecute'#0#0#7'TActio'
|
||||
+'n'#20'actOptimizeWidthCol1'#7'Caption'#6#17'Optimize width...'#18'DisableIf'
|
||||
,'NoHandler'#9#9'OnExecute'#7#27'actOptimizeWidthCol1Execute'#0#0#0#0
|
||||
'TPF0'#17'TRxDBGridMainForm'#16'RxDBGridMainForm'#4'Left'#3'-'#1#6'Height'#3
|
||||
+'F'#2#3'Top'#3#161#0#5'Width'#3#201#3#18'HorzScrollBar.Page'#3#200#3#18'Vert'
|
||||
+'ScrollBar.Page'#3'E'#2#13'ActiveControl'#7#9'RxDBGrid1'#7'Caption'#6#26'RxD'
|
||||
+'BGrid Demo (ver 3) ...'#12'ClientHeight'#3'F'#2#11'ClientWidth'#3#201#3#8
|
||||
+'OnCreate'#7#10'FormCreate'#0#9'TRxDBGrid'#9'RxDBGrid1'#6'Height'#3#20#2#3'T'
|
||||
+'op'#2'2'#5'Width'#3#201#3#7'Columns'#14#1#15'Title.Alignment'#7#8'taCenter'
|
||||
+#13'Title.Caption'#6#4'Code'#9'FieldName'#6#2'ID'#16'Footer.Alignment'#7#14
|
||||
+'taRightJustify'#20'Footer.DisplayFormat'#6#9'Count: %d'#16'Footer.ValueType'
|
||||
+#7#8'fvtCount'#12'Filter.Color'#7#6'clLime'#16'Filter.ItemIndex'#2#255#0#1#15
|
||||
+'Title.Alignment'#7#8'taCenter'#13'Title.Caption'#6#13'Software Name'#5'Widt'
|
||||
+'h'#3'^'#1#9'FieldName'#6#4'NAME'#12'Filter.Color'#7#6'clLime'#16'Filter.Ite'
|
||||
+'mIndex'#2#255#0#1#15'Title.Alignment'#7#8'taCenter'#5'Width'#3#150#0#9'Fiel'
|
||||
+'dName'#6#9'Developer'#12'Filter.Color'#7#6'clLime'#16'Filter.ItemIndex'#2
|
||||
+#255#0#1#15'Title.Alignment'#7#8'taCenter'#13'Title.Caption'#6#4'Cost'#5'Wid'
|
||||
+'th'#2'Z'#9'FieldName'#6#5'PRICE'#13'DisplayFormat'#6#8'#,##0.00'#16'Footer.'
|
||||
+'Alignment'#7#14'taRightJustify'#20'Footer.DisplayFormat'#6#8'#,##0.00'#16'F'
|
||||
+'ooter.FieldName'#6#5'PRICE'#16'Footer.ValueType'#7#6'fvtSum'#12'Filter.Colo'
|
||||
+'r'#7#6'clLime'#16'Filter.ItemIndex'#2#255#0#1#15'Title.Alignment'#7#8'taCen'
|
||||
+'ter'#13'Title.Caption'#6#12'Date Present'#5'Width'#2'd'#9'FieldName'#6#12'D'
|
||||
+'ate_Present'#16'Filter.ItemIndex'#2#255#0#1#15'Title.Alignment'#7#8'taCente'
|
||||
+'r'#5'Width'#3#150#0#9'FieldName'#6#12'DEVELOPER_ID'#16'Filter.ItemIndex'#2
|
||||
+#255#0#0#9'OptionsRx'#11#13'rdgFooterRows'#0#11'FooterColor'#7#8'clYellow'#14
|
||||
+'FooterRowCount'#2#1#9'OnFiltred'#7#16'RxDBGrid1Filtred'#5'Align'#7#8'alClie'
|
||||
+'nt'#10'FocusColor'#7#5'clRed'#13'SelectedColor'#7#11'clHighlight'#10'DataSo'
|
||||
+'urce'#7#11'Datasource1'#10'FixedColor'#7#9'clBtnFace'#7'Options'#11#9'dgEdi'
|
||||
+'ting'#8'dgTitles'#11'dgIndicator'#14'dgColumnResize'#12'dgColumnMove'#10'dg'
|
||||
+'ColLines'#10'dgRowLines'#6'dgTabs'#21'dgAlwaysShowSelection'#15'dgConfirmDe'
|
||||
+'lete'#14'dgCancelOnExit'#13'dgMultiselect'#0#12'OptionsExtra'#11#14'dgeAuto'
|
||||
+'Columns'#17'dgeCheckboxColumn'#0#11'ParentColor'#8#9'PopupMenu'#7#10'PopupM'
|
||||
+'enu1'#8'TabOrder'#2#0#7'TabStop'#9#0#0#6'TPanel'#6'Panel1'#6'Height'#2'2'#5
|
||||
+'Width'#3#201#3#5'Align'#7#5'alTop'#12'ClientHeight'#2'2'#11'ClientWidth'#3
|
||||
+#201#3#8'TabOrder'#2#1#0#7'TButton'#7'Button1'#4'Left'#2#8#6'Height'#2#25#3
|
||||
+'Top'#2#8#5'Width'#2'K'#6'Action'#7#12'actCalcTotal'#25'BorderSpacing.InnerB'
|
||||
+'order'#2#4#8'TabOrder'#2#0#0#0#7'TButton'#7'Button2'#4'Left'#2'X'#6'Height'
|
||||
+#2#25#3'Top'#2#8#5'Width'#3#136#0#6'Action'#7#26'actOptimizeColumnsWidthAll'
|
||||
+#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#1#0#0#9'TCheckBox'#9'CheckB'
|
||||
+'ox1'#4'Left'#3#241#0#6'Height'#2#20#3'Top'#2#8#5'Width'#2'K'#7'Caption'#6#10
|
||||
+'Use filter'#8'OnChange'#7#15'CheckBox1Change'#8'TabOrder'#2#2#11'UseOnChang'
|
||||
+'e'#9#0#0#0#13'TRxMemoryData'#13'RxMemoryData1'#9'FieldDefs'#14#1#4'Name'#6#2
|
||||
+'ID'#8'DataType'#7#9'ftInteger'#9'Precision'#2#255#4'Size'#2#7#0#1#4'Name'#6
|
||||
+#4'NAME'#8'DataType'#7#8'ftString'#9'Precision'#2#255#4'Size'#3#150#0#0#1#4
|
||||
+'Name'#6#5'PRICE'#8'DataType'#7#7'ftFloat'#9'Precision'#2#2#4'Size'#2#12#0#1
|
||||
+#4'Name'#6#9'Developer'#8'DataType'#7#8'ftString'#9'Precision'#2#255#4'Size'
|
||||
+#3#150#0#0#1#4'Name'#6#12'Date_Present'#8'DataType'#7#6'ftDate'#0#1#4'Name'#6
|
||||
+#12'DEVELOPER_ID'#8'DataType'#7#9'ftInteger'#0#0#16'OnFilterRecordEx'#7#27'R'
|
||||
+'xMemoryData1FilterRecordEx'#4'left'#3#152#0#3'top'#3#8#1#0#13'TLongintField'
|
||||
+#16'RxMemoryData1ID1'#9'AlignMent'#7#14'taRightJustify'#12'DisplayWidth'#2#10
|
||||
+#9'FieldName'#6#2'ID'#13'ProviderFlags'#11#10'pfInUpdate'#9'pfInWhere'#0#0#0
|
||||
+#12'TStringField'#18'RxMemoryData1NAME1'#12'DisplayWidth'#3#150#0#9'FieldNam'
|
||||
+'e'#6#4'NAME'#5'Index'#2#1#13'ProviderFlags'#11#10'pfInUpdate'#9'pfInWhere'#0
|
||||
+#4'Size'#3#150#0#0#0#11'TFloatField'#19'RxMemoryData1PRICE1'#9'AlignMent'#7
|
||||
+#14'taRightJustify'#12'DisplayWidth'#2#10#9'FieldName'#6#5'PRICE'#5'Index'#2
|
||||
+#2#13'ProviderFlags'#11#10'pfInUpdate'#9'pfInWhere'#0#13'DisplayFormat'#6#8
|
||||
+'#,##0.00'#9'Precision'#2#2#0#0#12'TStringField'#23'RxMemoryData1Developer1'
|
||||
+#12'DisplayWidth'#3#150#0#9'FieldName'#6#9'Developer'#5'Index'#2#3#13'Provid'
|
||||
+'erFlags'#11#10'pfInUpdate'#9'pfInWhere'#0#4'Size'#3#150#0#0#0#10'TDateField'
|
||||
+#26'RxMemoryData1Date_Present1'#12'DisplayWidth'#2#10#9'FieldName'#6#12'Date'
|
||||
+'_Present'#5'Index'#2#4#13'ProviderFlags'#11#10'pfInUpdate'#9'pfInWhere'#0#0
|
||||
+#0#13'TLongintField'#26'RxMemoryData1DEVELOPER_ID1'#9'AlignMent'#7#14'taRigh'
|
||||
+'tJustify'#12'DisplayWidth'#2#10#9'FieldName'#6#12'DEVELOPER_ID'#5'Index'#2#5
|
||||
+#13'LookupDataSet'#7#13'RxMemoryData2'#15'LookupKeyFields'#6#12'DEVELOPER_ID'
|
||||
+#17'LookupResultField'#6#14'DEVELOPER_NAME'#9'KeyFields'#6#12'DEVELOPER_ID'
|
||||
+#13'ProviderFlags'#11#10'pfInUpdate'#9'pfInWhere'#0#0#0#0#11'TDatasource'#11
|
||||
+'Datasource1'#7'DataSet'#7#13'RxMemoryData1'#4'left'#2'x'#3'top'#3#8#1#0#0#10
|
||||
,'TPopupMenu'#10'PopupMenu1'#4'left'#3#152#0#3'top'#3#197#0#0#9'TMenuItem'#9
|
||||
+'MenuItem1'#6'Action'#7#20'actOptimizeWidthCol1'#7'OnClick'#7#27'actOptimize'
|
||||
+'WidthCol1Execute'#0#0#9'TMenuItem'#9'MenuItem2'#7'Caption'#6#1'-'#0#0#9'TMe'
|
||||
+'nuItem'#9'MenuItem4'#6'Action'#7#12'actCalcTotal'#7'OnClick'#7#19'actCalcTo'
|
||||
+'talExecute'#0#0#9'TMenuItem'#9'MenuItem3'#6'Action'#7#26'actOptimizeColumns'
|
||||
+'WidthAll'#7'OnClick'#7'!actOptimizeColumnsWidthAllExecute'#0#0#0#11'TAction'
|
||||
+'List'#11'ActionList1'#4'left'#3#206#0#3'top'#3#197#0#0#7'TAction'#12'actCal'
|
||||
+'cTotal'#7'Caption'#6#13'Calc total...'#18'DisableIfNoHandler'#9#9'OnExecute'
|
||||
+#7#19'actCalcTotalExecute'#0#0#7'TAction'#26'actOptimizeColumnsWidthAll'#7'C'
|
||||
+'aption'#6#25'Optimize width for all...'#18'DisableIfNoHandler'#9#9'OnExecut'
|
||||
+'e'#7'!actOptimizeColumnsWidthAllExecute'#0#0#7'TAction'#20'actOptimizeWidth'
|
||||
+'Col1'#7'Caption'#6#17'Optimize width...'#18'DisableIfNoHandler'#9#9'OnExecu'
|
||||
+'te'#7#27'actOptimizeWidthCol1Execute'#0#0#0#11'TDatasource'#11'Datasource2'
|
||||
+#7'DataSet'#7#13'RxMemoryData2'#4'left'#3#207#0#3'top'#3#8#1#0#0#13'TRxMemor'
|
||||
+'yData'#13'RxMemoryData2'#9'FieldDefs'#14#1#4'Name'#6#12'DEVELOPER_ID'#8'Dat'
|
||||
+'aType'#7#9'ftInteger'#0#1#4'Name'#6#14'DEVELOPER_NAME'#8'DataType'#7#8'ftSt'
|
||||
+'ring'#4'Size'#3#130#0#0#0#4'left'#3#240#0#3'top'#3#8#1#0#13'TLongintField'
|
||||
+#26'RxMemoryData2DEVELOPER_ID1'#9'AlignMent'#7#14'taRightJustify'#12'Display'
|
||||
+'Width'#2#10#9'FieldName'#6#12'DEVELOPER_ID'#13'ProviderFlags'#11#10'pfInUpd'
|
||||
+'ate'#9'pfInWhere'#0#0#0#12'TStringField'#28'RxMemoryData2DEVELOPER_NAME1'#12
|
||||
+'DisplayWidth'#3#130#0#9'FieldName'#6#14'DEVELOPER_NAME'#5'Index'#2#1#13'Pro'
|
||||
+'viderFlags'#11#10'pfInUpdate'#9'pfInWhere'#0#4'Size'#3#130#0#0#0#0#0
|
||||
]);
|
||||
|
@ -6,7 +6,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, rxmemds,
|
||||
DB, rxdbgrid, ExtCtrls, Buttons, Menus, ActnList, StdCtrls;
|
||||
DB, rxdbgrid, ExtCtrls, Buttons, Menus, ActnList, StdCtrls, DBGrids;
|
||||
|
||||
type
|
||||
|
||||
@ -21,6 +21,7 @@ type
|
||||
Button2: TButton;
|
||||
CheckBox1: TCheckBox;
|
||||
Datasource1: TDatasource;
|
||||
Datasource2: TDatasource;
|
||||
MenuItem1: TMenuItem;
|
||||
MenuItem2: TMenuItem;
|
||||
MenuItem3: TMenuItem;
|
||||
@ -29,10 +30,15 @@ type
|
||||
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;
|
||||
procedure actCalcTotalExecute(Sender: TObject);
|
||||
procedure actOptimizeColumnsWidthAllExecute(Sender: TObject);
|
||||
procedure actOptimizeWidthCol1Execute(Sender: TObject);
|
||||
@ -56,18 +62,23 @@ implementation
|
||||
|
||||
procedure TRxDBGridMainForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
RxMemoryData2.Open;
|
||||
RxMemoryData2.AppendRecord([1, 'Open source']);
|
||||
RxMemoryData2.AppendRecord([2, 'Borland']);
|
||||
RxMemoryData2.AppendRecord([3, 'Microsoft']);
|
||||
|
||||
RxMemoryData1.Open;
|
||||
RxMemoryData1.AppendRecord([1, 'Lazarus 0.9.23', 0, 'Open source']);
|
||||
RxMemoryData1.AppendRecord([2, 'Delphi 7.0 Prof', 990, 'Borland']);
|
||||
RxMemoryData1.AppendRecord([3, 'Open Office 2.2.0', 0, 'Open source']);
|
||||
RxMemoryData1.AppendRecord([4, 'Microsoft Office', 150, 'Microsoft']);
|
||||
RxMemoryData1.AppendRecord([5, 'Microsoft Windows 95', 50, 'Microsoft']);
|
||||
RxMemoryData1.AppendRecord([6, 'Microsoft Windows 98', 90, 'Microsoft']);
|
||||
RxMemoryData1.AppendRecord([7, 'Microsoft Windows ME', 90, 'Microsoft']);
|
||||
RxMemoryData1.AppendRecord([8, 'Microsoft Windows NT 4.0', 250, 'Microsoft']);
|
||||
RxMemoryData1.AppendRecord([9, 'Microsoft Windows 2000', 150, 'Microsoft']);
|
||||
RxMemoryData1.AppendRecord([10, 'Microsoft Windows XP', 130, 'Microsoft']);
|
||||
RxMemoryData1.AppendRecord([11, 'Microsoft Windows Vista', 180, 'Microsoft']);
|
||||
RxMemoryData1.AppendRecord([1, 'Lazarus 0.9.23', 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]);
|
||||
DoFillFilters;
|
||||
RxMemoryData1.First;
|
||||
RxDBGrid1.CalcStatTotals; //fix error in GotoBookmark
|
||||
@ -100,6 +111,13 @@ var
|
||||
C:TRxColumn;
|
||||
i:integer;
|
||||
begin
|
||||
for i:=0 to RxDBGrid1.Columns.Count-1 do
|
||||
begin
|
||||
C:=TRxColumn(RxDBGrid1.Columns[i]);
|
||||
C.Filter.EmptyValue:='None...';
|
||||
C.Filter.ValueList.Add(C.Filter.EmptyValue);
|
||||
end;
|
||||
|
||||
RxMemoryData1.First;
|
||||
while not RxMemoryData1.EOF do
|
||||
begin
|
||||
|
@ -23,6 +23,10 @@
|
||||
+ Cosmetic fix in paint TRxCustomDBLookupCombo
|
||||
+ Dropdown list in TRxCustomDBLookupCombo show after clikc on component
|
||||
+ minor fix in RxDBGrid paint sort marker and column title
|
||||
+ New component - TRxDateEdit
|
||||
+ In RxDBGrid create editor for field with type ftDate, ftDateTime - based on TRxDateEdit
|
||||
(see Demos/RxDBGrid)
|
||||
- minor fix in filter combobox in RxDBGrid for GTK and GTK2
|
||||
29.08.2007 - ������ 1.1.5.98 (svn revision 39)
|
||||
+ In RxDBgrid - after close dataset list of SelectedRows is cleared
|
||||
+ fix resaizing find form for RxDbGrd
|
||||
|
@ -28,6 +28,10 @@
|
||||
+ ������������� ��������� ��������� TRxCustomDBLookupCombo
|
||||
+ ���������� ������ � TRxCustomDBLookupCombo ������������ ������ �� ����� �� ����������
|
||||
+ � RxDBGrid ���������� ��������� ������� ���������� � ��������� �������
|
||||
+ ��������� � ������� ��������� TRxDateEdit
|
||||
+ � RxDBGrid ���������� �������� ��� ����� ���� ftDate, ftDateTime �� ������� TRxDateEdit
|
||||
(��. Demos/RxDBGrid)
|
||||
+ ��������� ���������� � RxDBGrid ��� GTK � GTK2
|
||||
29.08.2007 - ������ 1.1.5.98 (svn revision 39)
|
||||
+ � RxDBGrid ����� �������� ������ ������ ������ ���������� ����� (SelectedRows)
|
||||
���������
|
||||
|
@ -39,7 +39,7 @@ type
|
||||
|
||||
TOptionsRx = set of TOptionRx;
|
||||
|
||||
TDataSetClass = class of TDataSet;
|
||||
// TDataSetClass = class of TDataSet;
|
||||
|
||||
TRxColumn = class;
|
||||
|
||||
@ -229,6 +229,7 @@ type
|
||||
FVersion: Integer;
|
||||
FPropertyStorageLink:TPropertyStorageLink;
|
||||
FRxDbGridLookupComboEditor:TCustomControl;
|
||||
FRxDbGridDateEditor:TWinControl;
|
||||
|
||||
function GetColumns: TRxDbGridColumns;
|
||||
function GetPropertyStorage: TCustomPropertyStorage;
|
||||
@ -398,7 +399,8 @@ type
|
||||
procedure RegisterExDBGridSortEngine(ExDBGridSortEngineClass:TExDBGridSortEngineClass; DataSetClass:TDataSetClass);
|
||||
|
||||
implementation
|
||||
uses Math, rxdconst, rxstrutils, rxdbgrid_findunit, rxdbgrid_columsunit, rxlookup;
|
||||
uses Math, rxdconst, rxstrutils, rxdbgrid_findunit, rxdbgrid_columsunit,
|
||||
rxlookup, tooledit, LCLProc;
|
||||
|
||||
var
|
||||
ExDBGridSortEngineList:TStringList;
|
||||
@ -442,6 +444,164 @@ type
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
{ TRxDBGridDateEditor }
|
||||
TRxDBGridDateEditor = class(TCustomRxDateEdit)
|
||||
private
|
||||
FGrid: TRxDBGrid;
|
||||
FCol,FRow: Integer;
|
||||
protected
|
||||
procedure Change; override;
|
||||
procedure KeyDown(var Key : Word; Shift : TShiftState); override;
|
||||
|
||||
procedure WndProc(var TheMessage : TLMessage); override;
|
||||
procedure msg_SetGrid(var Msg: TGridMessage); message GM_SETGRID;
|
||||
procedure msg_SetValue(var Msg: TGridMessage); message GM_SETVALUE;
|
||||
procedure msg_GetValue(var Msg: TGridMessage); message GM_GETVALUE;
|
||||
procedure msg_SelectAll(var Msg: TGridMessage); message GM_SELECTALL;
|
||||
|
||||
procedure SetBounds(aLeft, aTop, aWidth, aHeight: integer); override;
|
||||
public
|
||||
procedure EditingDone; override;
|
||||
end;
|
||||
|
||||
|
||||
{ TRxDBGridDateEditor }
|
||||
|
||||
procedure TRxDBGridDateEditor.Change;
|
||||
begin
|
||||
inherited Change;
|
||||
if Assigned(FGrid) and FGrid.DatalinkActive and not FGrid.EditorIsReadOnly then
|
||||
begin
|
||||
if not (FGrid.DataSource.DataSet.State in dsEditModes) then
|
||||
FGrid.DataSource.Edit;
|
||||
if Self.Text <> '' then
|
||||
FGrid.SelectedField.AsDateTime:=Self.Date
|
||||
else
|
||||
FGrid.SelectedField.Clear;
|
||||
|
||||
if FGrid<>nil then
|
||||
FGrid.SetEditText(FCol, FRow, Text);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridDateEditor.KeyDown(var Key: Word; Shift: TShiftState);
|
||||
function AllSelected: boolean;
|
||||
begin
|
||||
result := (SelLength>0) and (SelLength=UTF8Length(Text));
|
||||
end;
|
||||
function AtStart: Boolean;
|
||||
begin
|
||||
Result:= (SelStart=0);
|
||||
end;
|
||||
function AtEnd: Boolean;
|
||||
begin
|
||||
result := ((SelStart+1)>UTF8Length(Text)) or AllSelected;
|
||||
end;
|
||||
procedure doEditorKeyDown;
|
||||
begin
|
||||
if FGrid<>nil then
|
||||
FGrid.EditorkeyDown(Self, key, shift);
|
||||
end;
|
||||
procedure doGridKeyDown;
|
||||
begin
|
||||
if FGrid<>nil then
|
||||
FGrid.KeyDown(Key, shift);
|
||||
end;
|
||||
function GetFastEntry: boolean;
|
||||
begin
|
||||
if FGrid<>nil then
|
||||
Result := FGrid.FastEditing
|
||||
else
|
||||
Result := False;
|
||||
end;
|
||||
procedure CheckEditingKey;
|
||||
begin
|
||||
if (FGrid=nil) or FGrid.EditorIsReadOnly then
|
||||
Key := 0;
|
||||
end;
|
||||
var
|
||||
IntSel: boolean;
|
||||
begin
|
||||
inherited KeyDown(Key,Shift);
|
||||
case Key of
|
||||
VK_F2:
|
||||
if AllSelected then begin
|
||||
SelLength := 0;
|
||||
SelStart := Length(Text);
|
||||
end;
|
||||
VK_DELETE:
|
||||
CheckEditingKey;
|
||||
VK_UP, VK_DOWN:
|
||||
doGridKeyDown;
|
||||
VK_LEFT, VK_RIGHT:
|
||||
if GetFastEntry then begin
|
||||
IntSel:=
|
||||
((Key=VK_LEFT) and not AtStart) or
|
||||
((Key=VK_RIGHT) and not AtEnd);
|
||||
if not IntSel then begin
|
||||
doGridKeyDown;
|
||||
end;
|
||||
end;
|
||||
VK_END, VK_HOME:
|
||||
;
|
||||
else
|
||||
doEditorKeyDown;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridDateEditor.WndProc(var TheMessage: TLMessage);
|
||||
begin
|
||||
if TheMessage.msg=LM_KILLFOCUS then
|
||||
begin
|
||||
if HWND(TheMessage.WParam) = HWND(Handle) then
|
||||
begin
|
||||
// lost the focus but it returns to ourselves
|
||||
// eat the message.
|
||||
TheMessage.Result := 0;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
inherited WndProc(TheMessage);
|
||||
end;
|
||||
|
||||
procedure TRxDBGridDateEditor.msg_SetGrid(var Msg: TGridMessage);
|
||||
begin
|
||||
FGrid:=Msg.Grid as TRxDBGrid;
|
||||
Msg.Options:=EO_AUTOSIZE or EO_SELECTALL {or EO_HOOKEXIT or EO_HOOKKEYPRESS or EO_HOOKKEYUP};
|
||||
end;
|
||||
|
||||
procedure TRxDBGridDateEditor.msg_SetValue(var Msg: TGridMessage);
|
||||
begin
|
||||
Self.Date:=FGrid.SelectedField.AsDateTime;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridDateEditor.msg_GetValue(var Msg: TGridMessage);
|
||||
var
|
||||
sText:string;
|
||||
begin
|
||||
sText:=Text;
|
||||
Msg.Value:=sText;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridDateEditor.msg_SelectAll(var Msg: TGridMessage);
|
||||
begin
|
||||
SelectAll;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridDateEditor.SetBounds(aLeft, aTop, aWidth, aHeight: integer);
|
||||
begin
|
||||
Dec(aWidth, 25);
|
||||
inherited SetBounds(aLeft, aTop, aWidth, aHeight);
|
||||
end;
|
||||
|
||||
procedure TRxDBGridDateEditor.EditingDone;
|
||||
begin
|
||||
inherited EditingDone;
|
||||
if FGrid<>nil then
|
||||
FGrid.EditingDone;
|
||||
end;
|
||||
|
||||
|
||||
{ TRxDBGridLookupComboEditor }
|
||||
|
||||
procedure TRxDBGridLookupComboEditor.WndProc(var TheMessage: TLMessage);
|
||||
@ -489,7 +649,7 @@ end;
|
||||
|
||||
procedure TRxDBGridLookupComboEditor.msg_SetValue(var Msg: TGridMessage);
|
||||
var
|
||||
F, LF:TField;
|
||||
F:TField;
|
||||
begin
|
||||
FCol := Msg.Col;
|
||||
FRow := Msg.Row;
|
||||
@ -498,8 +658,8 @@ begin
|
||||
if Assigned(F) then
|
||||
begin
|
||||
DataField:=F.FieldName;
|
||||
LookupDisplay:=F.LookupKeyFields;
|
||||
LookupField:=F.LookupResultField;
|
||||
LookupDisplay:=F.LookupResultField;
|
||||
LookupField:=F.LookupKeyFields;
|
||||
FLDS.DataSet:=F.LookupDataSet;
|
||||
end;
|
||||
end;
|
||||
@ -737,13 +897,13 @@ end;
|
||||
function TRxDBGrid.getFilterRect(bRect: TRect): TRect;
|
||||
begin
|
||||
Result := bRect;
|
||||
Result.Top := bRect.Bottom - 19;
|
||||
Result.Top := bRect.Bottom - DefaultRowHeight;
|
||||
end;
|
||||
|
||||
function TRxDBGrid.getTitleRect(bRect: TRect): TRect;
|
||||
begin
|
||||
Result := bRect;
|
||||
Result.Bottom := bRect.Bottom - 19;
|
||||
Result.Bottom := bRect.Bottom - DefaultRowHeight;
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.OnIniSave(Sender: TObject);
|
||||
@ -782,7 +942,7 @@ end;
|
||||
|
||||
var
|
||||
i, ACount:integer;
|
||||
S, S1, ColumName, S2:string;
|
||||
S, S1, ColumName{, S2}:string;
|
||||
C:TRxColumn;
|
||||
|
||||
begin
|
||||
@ -1278,11 +1438,11 @@ procedure TRxDBGrid.MouseDown(Button: TMouseButton; Shift: TShiftState; X,
|
||||
var
|
||||
Cell: TGridCoord;
|
||||
Rect : TRect;
|
||||
X1,X2,Y1,Y2 : integer;
|
||||
msg: TGridMessage;
|
||||
pow : TForm;
|
||||
curCol,curRow : integer;
|
||||
dump : integer;
|
||||
// X1,X2,Y1,Y2 : integer;
|
||||
// msg: TGridMessage;
|
||||
// pow : TForm;
|
||||
// curCol,curRow : integer;
|
||||
// dump : integer;
|
||||
begin
|
||||
Cell := MouseCoord(X, Y);
|
||||
if (Cell.Y=0) and (Cell.X >= ord(dgIndicator in Options)) then
|
||||
@ -1303,7 +1463,8 @@ begin
|
||||
Height := Rect.Bottom - Rect.Top;
|
||||
BoundsRect := Rect;
|
||||
Style := csDropDownList;
|
||||
DropDownCount := TRxColumn(Columns[Columns.RealIndex(Cell.x-1)]).Filter.DropDownRows;
|
||||
// DropDownCount := TRxColumn(Columns[Columns.RealIndex(Cell.x-1)]).Filter.DropDownRows;
|
||||
Text:=TRxColumn(Columns[Columns.RealIndex(Cell.x-1)]).Filter.Value;
|
||||
Show(Self,Cell.x-1);
|
||||
end;
|
||||
exit;
|
||||
@ -1627,6 +1788,12 @@ begin
|
||||
Result:=FRxDbGridLookupComboEditor;
|
||||
exit;
|
||||
end
|
||||
else
|
||||
if F.DataType in [ftDate, ftDateTime] then
|
||||
begin
|
||||
Result:=FRxDbGridDateEditor;
|
||||
exit;
|
||||
end;
|
||||
end
|
||||
end;
|
||||
Result:=inherited EditorByStyle(Style);
|
||||
@ -1750,11 +1917,16 @@ begin
|
||||
FRxDbGridLookupComboEditor:=TRxDBGridLookupComboEditor.Create(nil);
|
||||
FRxDbGridLookupComboEditor.Name:='RxDBGridLookupComboEditor';
|
||||
FRxDbGridLookupComboEditor.Visible:=false;
|
||||
|
||||
FRxDbGridDateEditor:=TRxDBGridDateEditor.Create(nil);
|
||||
FRxDbGridDateEditor.Name:='RxDbGridDateEditor';
|
||||
FRxDbGridDateEditor.Visible:=false;
|
||||
end;
|
||||
|
||||
destructor TRxDBGrid.Destroy;
|
||||
begin
|
||||
FreeAndNil(FRxDbGridLookupComboEditor);
|
||||
FreeAndNil(FRxDbGridDateEditor);
|
||||
FreeAndNil(FMarkerDown);
|
||||
FreeAndNil(FMarkerUp);
|
||||
FreeAndNil(FPropertyStorageLink);
|
||||
@ -2169,8 +2341,9 @@ begin
|
||||
FGrid := Grid;
|
||||
FCol := Col;
|
||||
Visible := true;
|
||||
DroppedDown := true;
|
||||
// Text:=TRxColumn(TRxDBGrid(Grid).SelectedColumn).Filter.Value;
|
||||
SetFocus;
|
||||
// DroppedDown := true;
|
||||
end;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user