You've already forked lazarus-ccr
RxFPC:RxDBGrid - fix find dialog
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6918 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -17,9 +17,9 @@ object rxDBGridFindForm: TrxDBGridFindForm
|
|||||||
AnchorSideBottom.Control = Edit1
|
AnchorSideBottom.Control = Edit1
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 17
|
Height = 13
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 69
|
Width = 56
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Text to find'
|
Caption = 'Text to find'
|
||||||
FocusControl = Edit1
|
FocusControl = Edit1
|
||||||
@ -32,9 +32,9 @@ object rxDBGridFindForm: TrxDBGridFindForm
|
|||||||
AnchorSideBottom.Control = ComboBox1
|
AnchorSideBottom.Control = ComboBox1
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 17
|
Height = 13
|
||||||
Top = 69
|
Top = 52
|
||||||
Width = 72
|
Width = 56
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Find at filed'
|
Caption = 'Find at filed'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -43,10 +43,10 @@ object rxDBGridFindForm: TrxDBGridFindForm
|
|||||||
AnchorSideRight.Control = Button2
|
AnchorSideRight.Control = Button2
|
||||||
AnchorSideBottom.Control = Owner
|
AnchorSideBottom.Control = Owner
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 337
|
Left = 340
|
||||||
Height = 41
|
Height = 31
|
||||||
Top = 213
|
Top = 223
|
||||||
Width = 86
|
Width = 81
|
||||||
Anchors = [akRight, akBottom]
|
Anchors = [akRight, akBottom]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -63,10 +63,10 @@ object rxDBGridFindForm: TrxDBGridFindForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = Owner
|
AnchorSideBottom.Control = Owner
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 429
|
Left = 427
|
||||||
Height = 41
|
Height = 31
|
||||||
Top = 213
|
Top = 223
|
||||||
Width = 58
|
Width = 60
|
||||||
Anchors = [akRight, akBottom]
|
Anchors = [akRight, akBottom]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
@ -84,8 +84,8 @@ object rxDBGridFindForm: TrxDBGridFindForm
|
|||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 18
|
Left = 18
|
||||||
Height = 34
|
Height = 21
|
||||||
Top = 29
|
Top = 25
|
||||||
Width = 469
|
Width = 469
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -98,12 +98,12 @@ object rxDBGridFindForm: TrxDBGridFindForm
|
|||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 12
|
Left = 12
|
||||||
Height = 33
|
Height = 21
|
||||||
Top = 92
|
Top = 71
|
||||||
Width = 475
|
Width = 475
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
ItemHeight = 0
|
ItemHeight = 13
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
@ -116,10 +116,10 @@ object rxDBGridFindForm: TrxDBGridFindForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = Panel1
|
AnchorSideBottom.Control = Panel1
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 139
|
Left = 119
|
||||||
Height = 66
|
Height = 54
|
||||||
Top = 131
|
Top = 98
|
||||||
Width = 348
|
Width = 368
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
AutoFill = True
|
AutoFill = True
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
@ -135,8 +135,8 @@ object rxDBGridFindForm: TrxDBGridFindForm
|
|||||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
ChildSizing.ControlsPerLine = 3
|
ChildSizing.ControlsPerLine = 3
|
||||||
ClientHeight = 48
|
ClientHeight = 36
|
||||||
ClientWidth = 346
|
ClientWidth = 364
|
||||||
Columns = 3
|
Columns = 3
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
'All'
|
'All'
|
||||||
@ -150,22 +150,22 @@ object rxDBGridFindForm: TrxDBGridFindForm
|
|||||||
AnchorSideTop.Control = ComboBox1
|
AnchorSideTop.Control = ComboBox1
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 66
|
Height = 54
|
||||||
Top = 131
|
Top = 98
|
||||||
Width = 127
|
Width = 107
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
ClientHeight = 66
|
ClientHeight = 54
|
||||||
ClientWidth = 127
|
ClientWidth = 107
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
object CheckBox2: TCheckBox
|
object CheckBox2: TCheckBox
|
||||||
AnchorSideLeft.Control = Panel1
|
AnchorSideLeft.Control = Panel1
|
||||||
AnchorSideTop.Control = CheckBox1
|
AnchorSideTop.Control = CheckBox1
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 7
|
Left = 7
|
||||||
Height = 23
|
Height = 17
|
||||||
Top = 36
|
Top = 30
|
||||||
Width = 88
|
Width = 70
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Partial key'
|
Caption = 'Partial key'
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -174,9 +174,9 @@ object rxDBGridFindForm: TrxDBGridFindForm
|
|||||||
AnchorSideLeft.Control = Panel1
|
AnchorSideLeft.Control = Panel1
|
||||||
AnchorSideTop.Control = Panel1
|
AnchorSideTop.Control = Panel1
|
||||||
Left = 7
|
Left = 7
|
||||||
Height = 23
|
Height = 17
|
||||||
Top = 7
|
Top = 7
|
||||||
Width = 113
|
Width = 93
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Case sensetive'
|
Caption = 'Case sensetive'
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
@ -120,15 +120,15 @@ var
|
|||||||
SearchOrigin:TRxSearchDirection;
|
SearchOrigin:TRxSearchDirection;
|
||||||
P:TBookMark;
|
P:TBookMark;
|
||||||
R:boolean;
|
R:boolean;
|
||||||
|
FC: TRxColumn;
|
||||||
begin
|
begin
|
||||||
{ TODO -oalexs : Необходимо переделать поиск по колонке - искать всегда по строковому представлению. Иначе не ищет по дате-времени }
|
{ TODO -oalexs : Необходимо переделать поиск по колонке - искать всегда по строковому представлению. Иначе не ищет по дате-времени }
|
||||||
if (Edit1.Text<>'') and (ComboBox1.ItemIndex>=0) and (ComboBox1.ItemIndex<ComboBox1.Items.Count) and (ComboBox1.Text<>'') then
|
if (Edit1.Text<>'') and (ComboBox1.ItemIndex>=0) and (ComboBox1.ItemIndex<ComboBox1.Items.Count) and (ComboBox1.Text<>'') then
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
|
FC:=FGrid.ColumnByCaption(ComboBox1.Text);
|
||||||
//FieldName:=FGrid.Columns[ComboBox1.ItemIndex].FieldName;
|
if not Assigned(FC) then Exit;
|
||||||
//FieldName:=FGrid.ColumnByFieldName(ComboBox1.Text).FieldName;
|
FieldName:=FC.FieldName;
|
||||||
FieldName:=ComboBox1.Text;
|
|
||||||
LOptions:=[];
|
LOptions:=[];
|
||||||
if not CheckBox1.Checked then
|
if not CheckBox1.Checked then
|
||||||
LOptions:=LOptions+[loCaseInsensitive];
|
LOptions:=LOptions+[loCaseInsensitive];
|
||||||
|
Reference in New Issue
Block a user