From fdc71696d73b5f8d72e2a283bab42033d65a8899 Mon Sep 17 00:00:00 2001 From: vsnijders Date: Tue, 28 Aug 2007 21:55:23 +0000 Subject: [PATCH] rx corx component: updated to version 1.1.4.93 git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@246 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/rx/Demos/RxDBGrid/RxDBGridDemo.lpi | 124 +++--------- .../rx/Demos/RxDBGrid/rxdbgridmainunit.lfm | 72 ++++++- .../rx/Demos/RxDBGrid/rxdbgridmainunit.lrs | 111 ++++++----- .../rx/Demos/RxDBGrid/rxdbgridmainunit.pas | 79 +++++++- components/rx/WindowsXP.or | Bin 860 -> 0 bytes components/rx/docs/WhatsNew.eng.txt | 10 + components/rx/docs/WhatsNew.rus.txt | 15 ++ components/rx/docs/WhatsNew.txt | 184 ------------------ components/rx/docs/readmy.txt | 15 +- components/rx/images/mk_res.bat | 2 +- components/rx/registerrx.pas | 9 +- components/rx/rx.inc | 1 + components/rx/rx.lrs | 18 ++ components/rx/rxdbcomb.pas | 7 +- components/rx/rxdbgrid.pas | 34 +++- components/rx/rxlookup.pas | 24 ++- components/rx/rxnew.lpk | 8 +- components/rx/rxnew.pas | 6 +- components/rx/rxpopupunit.pas | 4 + 19 files changed, 365 insertions(+), 358 deletions(-) delete mode 100644 components/rx/WindowsXP.or delete mode 100644 components/rx/docs/WhatsNew.txt diff --git a/components/rx/Demos/RxDBGrid/RxDBGridDemo.lpi b/components/rx/Demos/RxDBGrid/RxDBGridDemo.lpi index cd55fbf20..1e722ddf3 100644 --- a/components/rx/Demos/RxDBGrid/RxDBGridDemo.lpi +++ b/components/rx/Demos/RxDBGrid/RxDBGridDemo.lpi @@ -47,7 +47,7 @@ - + @@ -56,10 +56,10 @@ - - + + - + @@ -88,7 +88,7 @@ - + @@ -114,127 +114,51 @@ - + - + - - + + - + - + - + - + - + - + - - + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -258,7 +182,7 @@ - + @@ -267,6 +191,10 @@ + + + + diff --git a/components/rx/Demos/RxDBGrid/rxdbgridmainunit.lfm b/components/rx/Demos/RxDBGrid/rxdbgridmainunit.lfm index cd6aa428a..e3f74f602 100644 --- a/components/rx/Demos/RxDBGrid/rxdbgridmainunit.lfm +++ b/components/rx/Demos/RxDBGrid/rxdbgridmainunit.lfm @@ -2,18 +2,18 @@ object RxDBGridMainForm: TRxDBGridMainForm Left = 353 Height = 582 Top = 161 - Width = 652 - HorzScrollBar.Page = 651 + Width = 827 + HorzScrollBar.Page = 826 VertScrollBar.Page = 581 ActiveControl = RxDBGrid1 Caption = 'RxDBGrid Demo (ver 2) ...' ClientHeight = 582 - ClientWidth = 652 + ClientWidth = 827 OnCreate = FormCreate object RxDBGrid1: TRxDBGrid Height = 532 Top = 50 - Width = 652 + Width = 827 Columns = < item Title.Alignment = taCenter @@ -22,6 +22,7 @@ object RxDBGridMainForm: TRxDBGridMainForm Footer.Alignment = taRightJustify Footer.DisplayFormat = 'Count: %d' Footer.ValueType = fvtCount + Filter.Color = clLime Filter.ItemIndex = -1 end item @@ -29,6 +30,14 @@ object RxDBGridMainForm: TRxDBGridMainForm Title.Caption = 'Software Name' Width = 450 FieldName = 'NAME' + Filter.Color = clLime + Filter.ItemIndex = -1 + end + item + Title.Alignment = taCenter + Width = 150 + FieldName = 'Developer' + Filter.Color = clLime Filter.ItemIndex = -1 end item @@ -41,11 +50,13 @@ object RxDBGridMainForm: TRxDBGridMainForm Footer.DisplayFormat = '#,##0.00' Footer.FieldName = 'PRICE' Footer.ValueType = fvtSum + Filter.Color = clLime Filter.ItemIndex = -1 end> OptionsRx = [rdgFooterRows] FooterColor = clYellow FooterRowCount = 1 + OnFiltred = RxDBGrid1Filtred Align = alClient FocusColor = clRed SelectedColor = clHighlight @@ -61,10 +72,10 @@ object RxDBGridMainForm: TRxDBGridMainForm end object Panel1: TPanel Height = 50 - Width = 652 + Width = 827 Align = alTop ClientHeight = 50 - ClientWidth = 652 + ClientWidth = 827 TabOrder = 1 object Button1: TButton Left = 8 @@ -84,9 +95,18 @@ object RxDBGridMainForm: TRxDBGridMainForm BorderSpacing.InnerBorder = 4 TabOrder = 1 end + object CheckBox1: TCheckBox + Left = 241 + Height = 13 + Top = 8 + Width = 61 + Caption = 'Use filter' + OnChange = CheckBox1Change + TabOrder = 2 + UseOnChange = True + end end object RxMemoryData1: TRxMemoryData - Active = True FieldDefs = < item Name = 'ID' @@ -105,9 +125,45 @@ object RxDBGridMainForm: TRxDBGridMainForm DataType = ftFloat Precision = 2 Size = 12 + end + item + Name = 'Developer' + DataType = ftString + Precision = -1 + Size = 150 end> - left = 152 + OnFilterRecordEx = RxMemoryData1FilterRecordEx + left = 144 top = 264 + object RxMemoryData1ID1: TLongintField + AlignMent = taRightJustify + DisplayWidth = 10 + FieldName = 'ID' + ProviderFlags = [pfInUpdate, pfInWhere] + end + object RxMemoryData1NAME1: TStringField + DisplayWidth = 150 + FieldName = 'NAME' + Index = 1 + ProviderFlags = [pfInUpdate, pfInWhere] + Size = 150 + end + object RxMemoryData1PRICE1: TFloatField + AlignMent = taRightJustify + DisplayWidth = 10 + FieldName = 'PRICE' + Index = 2 + ProviderFlags = [pfInUpdate, pfInWhere] + DisplayFormat = '#,##0.00' + Precision = 2 + end + object RxMemoryData1Developer1: TStringField + DisplayWidth = 150 + FieldName = 'Developer' + Index = 3 + ProviderFlags = [pfInUpdate, pfInWhere] + Size = 150 + end end object Datasource1: TDatasource DataSet = RxMemoryData1 diff --git a/components/rx/Demos/RxDBGrid/rxdbgridmainunit.lrs b/components/rx/Demos/RxDBGrid/rxdbgridmainunit.lrs index f8e11879e..e698485d5 100644 --- a/components/rx/Demos/RxDBGrid/rxdbgridmainunit.lrs +++ b/components/rx/Demos/RxDBGrid/rxdbgridmainunit.lrs @@ -2,51 +2,68 @@ 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#140#2#18'HorzScrollBar.Page'#3#139#2#18'Vert' - +'ScrollBar.Page'#3'E'#2#13'ActiveControl'#7#9'RxDBGrid1'#7'Caption'#6#26'RxD' - +'BGrid Demo (ver 2) ...'#12'ClientHeight'#3'F'#2#11'ClientWidth'#3#140#2#8 - +'OnCreate'#7#10'FormCreate'#0#9'TRxDBGrid'#9'RxDBGrid1'#6'Height'#3#20#2#3'T' - +'op'#2'2'#5'Width'#3#140#2#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'#16'Filter.ItemIndex'#2#255#0#1#15'Title.Alignment'#7#8'taCent' - +'er'#13'Title.Caption'#6#13'Software Name'#5'Width'#3#194#1#9'FieldName'#6#4 - +'NAME'#16'Filter.ItemIndex'#2#255#0#1#15'Title.Alignment'#7#8'taCenter'#13'T' - +'itle.Caption'#6#4'Cost'#5'Width'#2'Z'#9'FieldName'#6#5'PRICE'#13'DisplayFor' - +'mat'#6#8'#,##0.00'#16'Footer.Alignment'#7#14'taRightJustify'#20'Footer.Disp' - +'layFormat'#6#8'#,##0.00'#16'Footer.FieldName'#6#5'PRICE'#16'Footer.ValueTyp' - +'e'#7#6'fvtSum'#16'Filter.ItemIndex'#2#255#0#0#9'OptionsRx'#11#13'rdgFooterR' - +'ows'#0#11'FooterColor'#7#8'clYellow'#14'FooterRowCount'#2#1#5'Align'#7#8'al' - +'Client'#10'FocusColor'#7#5'clRed'#13'SelectedColor'#7#11'clHighlight'#10'Da' - +'taSource'#7#11'Datasource1'#10'FixedColor'#7#9'clBtnFace'#7'Options'#11#9'd' - +'gEditing'#8'dgTitles'#11'dgIndicator'#14'dgColumnResize'#12'dgColumnMove'#10 - +'dgColLines'#10'dgRowLines'#6'dgTabs'#21'dgAlwaysShowSelection'#15'dgConfirm' - +'Delete'#14'dgCancelOnExit'#13'dgMultiselect'#0#12'OptionsExtra'#11#14'dgeAu' - +'toColumns'#17'dgeCheckboxColumn'#0#11'ParentColor'#8#9'PopupMenu'#7#10'Popu' - +'pMenu1'#10'Scrollbars'#7#6'ssBoth'#8'TabOrder'#2#0#7'TabStop'#9#0#0#6'TPane' - +'l'#6'Panel1'#6'Height'#2'2'#5'Width'#3#140#2#5'Align'#7#5'alTop'#12'ClientH' - +'eight'#2'2'#11'ClientWidth'#3#140#2#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'actCalcT' - +'otal'#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#0#0#0#7'TButton'#7'Bu' - +'tton2'#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#0#13'TRxMemoryData'#13'RxMemoryData1'#6'Active'#9#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'Si' - +'ze'#2#12#0#0#4'left'#3#152#0#3'top'#3#8#1#0#0#11'TDatasource'#11'Datasource' - +'1'#7'DataSet'#7#13'RxMemoryData1'#4'left'#2'x'#3'top'#3#8#1#0#0#10'TPopupMe' - +'nu'#10'PopupMenu1'#4'left'#3#152#0#3'top'#3#197#0#0#9'TMenuItem'#9'MenuItem' - +'1'#6'Action'#7#20'actOptimizeWidthCol1'#7'OnClick'#7#27'actOptimizeWidthCol' - +'1Execute'#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'!actOptimizeColumnsWidthAllExecute'#0#0#0#11'TActionList'#11'Act' - +'ionList1'#4'left'#3#206#0#3'top'#3#197#0#0#7'TAction'#12'actCalcTotal'#7'Ca' - +'ption'#6#13'Calc total...'#18'DisableIfNoHandler'#9#9'OnExecute'#7#19'actCa' - +'lcTotalExecute'#0#0#7'TAction'#26'actOptimizeColumnsWidthAll'#7'Caption'#6 - +#25'Optimize width for all...'#18'DisableIfNoHandler'#9#9'OnExecute'#7'!actO' - +'ptimizeColumnsWidthAllExecute'#0#0#7'TAction'#20'actOptimizeWidthCol1'#7'Ca' - +'ption'#6#17'Optimize width...'#18'DisableIfNoHandler'#9#9'OnExecute'#7#27'a' - +'ctOptimizeWidthCol1Execute'#0#0#0#0 + +'F'#2#3'Top'#3#161#0#5'Width'#3';'#3#18'HorzScrollBar.Page'#3':'#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#144#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 ]); diff --git a/components/rx/Demos/RxDBGrid/rxdbgridmainunit.pas b/components/rx/Demos/RxDBGrid/rxdbgridmainunit.pas index e38646bb2..a69ba93ff 100644 --- a/components/rx/Demos/RxDBGrid/rxdbgridmainunit.pas +++ b/components/rx/Demos/RxDBGrid/rxdbgridmainunit.pas @@ -6,7 +6,7 @@ interface uses Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, rxmemds, - DB, rxdbgrid, ExtCtrls, Buttons, Menus, ActnList; + DB, rxdbgrid, ExtCtrls, Buttons, Menus, ActnList, StdCtrls; type @@ -19,6 +19,7 @@ type ActionList1: TActionList; Button1: TButton; Button2: TButton; + CheckBox1: TCheckBox; Datasource1: TDatasource; MenuItem1: TMenuItem; MenuItem2: TMenuItem; @@ -28,12 +29,20 @@ type PopupMenu1: TPopupMenu; RxDBGrid1: TRxDBGrid; RxMemoryData1: TRxMemoryData; + RxMemoryData1Developer1: TStringField; + RxMemoryData1ID1: TLongintField; + RxMemoryData1NAME1: TStringField; + RxMemoryData1PRICE1: TFloatField; procedure actCalcTotalExecute(Sender: TObject); procedure actOptimizeColumnsWidthAllExecute(Sender: TObject); procedure actOptimizeWidthCol1Execute(Sender: TObject); + procedure CheckBox1Change(Sender: TObject); procedure FormCreate(Sender: TObject); + procedure RxDBGrid1Filtred(Sender: TObject); + procedure RxMemoryData1FilterRecordEx(DataSet: TDataSet; var Accept: Boolean + ); private - { private declarations } + procedure DoFillFilters; public { public declarations } end; @@ -48,13 +57,62 @@ implementation procedure TRxDBGridMainForm.FormCreate(Sender: TObject); begin RxMemoryData1.Open; - RxMemoryData1.AppendRecord([1, 'Lazarus 0.9.23', 0]); - RxMemoryData1.AppendRecord([2, 'Delphi 7.0 Prof', 990]); - RxMemoryData1.AppendRecord([3, 'Open Office 2.2.0', 0]); - RxMemoryData1.AppendRecord([4, 'Microsof Office', 150]); + 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']); + DoFillFilters; + RxMemoryData1.First; RxDBGrid1.CalcStatTotals; //fix error in GotoBookmark end; +procedure TRxDBGridMainForm.RxDBGrid1Filtred(Sender: TObject); +begin + RxMemoryData1.First; +end; + +procedure TRxDBGridMainForm.RxMemoryData1FilterRecordEx(DataSet: TDataSet; + var Accept: Boolean); +var + i:integer; +begin + Accept:=true; + for i:=0 to RxDBGrid1.Columns.Count-1 do + begin + with TRxColumn(RxDBGrid1.Columns[i]) do + if (Filter.Value<>'') and (Filter.Value<>Field.AsString) then + begin + Accept:=false; + exit; + end; + end; +end; + +procedure TRxDBGridMainForm.DoFillFilters; +var + C:TRxColumn; + i:integer; +begin + RxMemoryData1.First; + while not RxMemoryData1.EOF do + begin + for i:=0 to RxDBGrid1.Columns.Count-1 do + begin + C:=TRxColumn(RxDBGrid1.Columns[i]); + 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; //fix error in GotoBookmark @@ -70,6 +128,15 @@ 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; + initialization {$I rxdbgridmainunit.lrs} diff --git a/components/rx/WindowsXP.or b/components/rx/WindowsXP.or deleted file mode 100644 index 9a3ccbaca03f6a4023d123cea62cad62f2b9cf1f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 860 zcmah|&1xGl5SAN5A&`4>6FLUGj$7NLVVyJ>LPJ^z#A$n#wX!X`l8i= zN8Tqh>s@C{0vXWH&iBn|=419ptHsF9cNp8;+N~r&P^Gup5KHlz;z>rlZ;V~h{psOx zOec9i;g0K`zM6jGAHLz=Z!`8Cu|K%}eZZ}<^z_c={8k4r-i<^rITTzwFraz1>s-Xgke|y4fpL@zV>h07Rw+~gC0MKWf0G1}HS5@9+xTl4e%7KURZ%E_wcd3| zhv4&ChdOH8?vR?@wp+vR%C#k~rnym 0) and (Cell.X >= ord(dgIndicator in Options)) and (ssDouble in Shift) then + begin + if Owner is TCustomForm then + TCustomForm(Owner).ModalResult:=mrOk; + end; + end; inherited MouseDown(Button, Shift, X, Y); + end; end; procedure TRxDBGrid.MouseUp(Button: TMouseButton; Shift: TShiftState; X, @@ -1466,6 +1481,7 @@ procedure TRxDBGrid.FFilterListEditorOnCloseUp(Sender: TObject); begin FFilterListEditor.Hide; FFilterListEditor.Changed; + SetFocus; end; procedure TRxDBGrid.InternalOptimizeColumnsWidth(AColList: TList); @@ -1510,6 +1526,11 @@ begin FreeMem(WA, SizeOf(Integer) * AColList.Count); end; +function TRxDBGrid.IsDefaultRowHeightStored: boolean; +begin + Result:=DefaultRowHeight = Canvas.TextHeight('W'); +end; + procedure TRxDBGrid.CalcStatTotals; var P:TBookmark; @@ -1593,7 +1614,10 @@ end; constructor TRxDBGrid.Create(AOwner: TComponent); begin inherited Create(AOwner); - +{$IFDEF RXDBGRID_OPTIONS_WO_CANCEL_ON_EXIT} + Options:=Options - [dgCancelOnExit]; +{$ENDIF} + FMarkerUp := TBitmap.Create; FMarkerUp.Handle := CreatePixmapIndirect(@IMGMarkerUp[0], GetSysColor(COLOR_BTNFACE)); @@ -2099,9 +2123,9 @@ end; initialization ExDBGridSortEngineList:=TStringList.Create; ExDBGridSortEngineList.Sorted:=true; - finalization - while (ExDBGridSortEngineList.Count>0) do begin + while (ExDBGridSortEngineList.Count>0) do + begin ExDBGridSortEngineList.Objects[0].Free; ExDBGridSortEngineList.Delete(0); end; diff --git a/components/rx/rxlookup.pas b/components/rx/rxlookup.pas index da11493c8..bf7fde5b1 100644 --- a/components/rx/rxlookup.pas +++ b/components/rx/rxlookup.pas @@ -144,6 +144,7 @@ type function GetFlat: Boolean; function GetGlyph: TBitmap; function GetNumGlyphs: Integer; + function GetOnGetGridCellProps: TGetCellPropsEvent; function GetPopupVisible: boolean; procedure SetButtonNeedsFocus(const AValue: Boolean); procedure SetButtonWidth(const AValue: Integer); @@ -161,6 +162,7 @@ type procedure SetLookupField(const AValue: string); procedure SetLookupSource(const AValue: TDataSource); procedure SetNumGlyphs(const AValue: Integer); + procedure SetOnGetGridCellProps(const AValue: TGetCellPropsEvent); procedure SetPopUpFormOptions(const AValue: TPopUpFormOptions); procedure SetReadOnly(const AValue: boolean); function StoreEmpty: boolean; @@ -220,6 +222,8 @@ type property LookupDisplayIndex: Integer read FLookupDisplayIndex write SetLookupDisplayIndex default 0; property LookupField: string read FLookupField write SetLookupField; property LookupSource: TDataSource read GetLookupSource write SetLookupSource; + property OnGetGridCellProps: TGetCellPropsEvent read GetOnGetGridCellProps + write SetOnGetGridCellProps; public constructor Create(AOwner: TComponent); override; destructor Destroy; override; @@ -267,6 +271,7 @@ type property OnMouseMove; property OnMouseUp; property OnStartDrag; + property OnGetGridCellProps; property ParentColor; property ParentCtl3D; property ParentFont; @@ -296,7 +301,7 @@ uses VCLUtils, Math; function CreateArrowBitmap:TBitmap; begin Result:=Graphics.TBitmap.Create; - Result.LoadFromLazarusResource('btn_downarrow'); + Result.LoadFromLazarusResource('rxbtn_downarrow'); end; { TCustomDBLookupEdit } @@ -604,6 +609,11 @@ begin else Result:=0; end; +function TRxCustomDBLookupCombo.GetOnGetGridCellProps: TGetCellPropsEvent; +begin + Result:=FPopUpFormOptions.OnGetCellProps; +end; + function TRxCustomDBLookupCombo.GetPopupVisible: boolean; begin Result:=Assigned(FRxPopUpForm); @@ -735,6 +745,12 @@ begin FButton.NumGlyphs:=AValue; end; +procedure TRxCustomDBLookupCombo.SetOnGetGridCellProps( + const AValue: TGetCellPropsEvent); +begin + FPopUpFormOptions.OnGetCellProps:=AValue; +end; + procedure TRxCustomDBLookupCombo.SetPopUpFormOptions( const AValue: TPopUpFormOptions); begin @@ -1323,4 +1339,10 @@ begin FDataControl.LookupDataSetChanged; end; +initialization + LazarusResources.Add('rxbtn_downarrow','XPM',[ + '/* XPM */'#13#10'static char * btn_downarrow_xpm[] = {'#13#10'"5 3 2 1",'#13 + +#10'" '#9'c None",'#13#10'".'#9'c #000000",'#13#10'".....",'#13#10'" ... ",' + +#13#10'" . "};'#13#10 +]); end. diff --git a/components/rx/rxnew.lpk b/components/rx/rxnew.lpk index e85f8ce04..37d623734 100644 --- a/components/rx/rxnew.lpk +++ b/components/rx/rxnew.lpk @@ -23,8 +23,8 @@ translate to Lazarus by alexs in 2005 - 2007 "/> - - + + @@ -174,6 +174,10 @@ translate to Lazarus by alexs in 2005 - 2007 + + + + diff --git a/components/rx/rxnew.pas b/components/rx/rxnew.pas index 95b4336ad..1b5432354 100644 --- a/components/rx/rxnew.pas +++ b/components/rx/rxnew.pas @@ -1,5 +1,5 @@ -{ This file was automatically created by Lazarus. Do not edit! -This source is only used to compile and install the package. +{ Этот файл был автоматически создан Lazarus. Не редактировать! +Исходный код используется только для компиляции и установки пакета. } unit rxnew; @@ -12,7 +12,7 @@ uses duallist, boxprocs, tooledit, rxswitch, rxdice, rxdbcomb, rxtoolbar, rxtbrsetup, fduallst, rxxpman, pagemngr, rxappicon, seldsfrm, rxctrls, rxlogin, rxdbgrid_findunit, rxdbgrid_columsunit, rxpopupunit, - rxcustomchartpanel, rxsortmemds, LazarusPackageIntf; + rxcustomchartpanel, rxsortmemds, AutoPanel, LazarusPackageIntf; implementation diff --git a/components/rx/rxpopupunit.pas b/components/rx/rxpopupunit.pas index 90d2d11bc..26814055b 100644 --- a/components/rx/rxpopupunit.pas +++ b/components/rx/rxpopupunit.pas @@ -117,6 +117,7 @@ type FColumns: TPopUpFormColumns; FDropDownCount: integer; FDropDownWidth: integer; + FOnGetCellProps: TGetCellPropsEvent; FOptions: TPopUpGridOptions; FShowTitles: boolean; FTitleButtons: boolean; @@ -144,6 +145,8 @@ type property ShowTitles:boolean read FShowTitles write SetShowTitles default false; property TitleButtons:boolean read FTitleButtons write SetTitleButtons default false; property TitleStyle:TTitleStyle read FTitleStyle write SetTitleStyle default tsLazarus; + property OnGetCellProps: TGetCellPropsEvent read FOnGetCellProps + write FOnGetCellProps; end; { TPopUpForm } @@ -466,6 +469,7 @@ begin FGrid.TitleButtons:=FPopUpFormOptions.TitleButtons; FGrid.TitleStyle:=FPopUpFormOptions.TitleStyle; FGrid.BorderStyle:=FPopUpFormOptions.BorderStyle; + FGrid.OnGetCellProps:=FPopUpFormOptions.OnGetCellProps; end; { TPopUpFormOptions }