You've already forked lazarus-ccr
RxFPC:add filter to TSelectDataSetForm
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8874 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -124,7 +124,8 @@ begin
|
|||||||
if ASize>-1 then
|
if ASize>-1 then
|
||||||
begin
|
begin
|
||||||
//ASize1 := MulDiv(ASize, Screen.PixelsPerInch, 96);
|
//ASize1 := MulDiv(ASize, Screen.PixelsPerInch, 96);
|
||||||
ASize1 := MulDiv(ASize, 96, Screen.PixelsPerInch);
|
if Screen.PixelsPerInch <> 0 then
|
||||||
|
ASize1 := MulDiv(ASize, 96, Screen.PixelsPerInch);
|
||||||
Result := IntToStr(ASize1);
|
Result := IntToStr(ASize1);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -133,6 +133,7 @@ const
|
|||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
|
'',
|
||||||
''
|
''
|
||||||
{$IFDEF RX_USE_DELPHI_EXT_FIELD_TYPES}
|
{$IFDEF RX_USE_DELPHI_EXT_FIELD_TYPES}
|
||||||
, ''
|
, ''
|
||||||
@ -141,7 +142,6 @@ const
|
|||||||
, ''
|
, ''
|
||||||
, ''
|
, ''
|
||||||
, ''
|
, ''
|
||||||
, ''
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
object SelectDataSetForm: TSelectDataSetForm
|
object SelectDataSetForm: TSelectDataSetForm
|
||||||
Left = 445
|
Left = 527
|
||||||
Height = 315
|
Height = 315
|
||||||
Top = 197
|
Top = 337
|
||||||
Width = 400
|
Width = 400
|
||||||
ActiveControl = CheckBox1
|
ActiveControl = CheckBox1
|
||||||
Caption = 'Select dataset to copy to'
|
Caption = 'Select dataset to copy to'
|
||||||
@ -9,7 +9,7 @@ object SelectDataSetForm: TSelectDataSetForm
|
|||||||
ClientWidth = 400
|
ClientWidth = 400
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '2.1.0.0'
|
LCLVersion = '3.99.0.0'
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideTop.Control = CheckBox1
|
AnchorSideTop.Control = CheckBox1
|
||||||
@ -17,7 +17,7 @@ object SelectDataSetForm: TSelectDataSetForm
|
|||||||
Left = 6
|
Left = 6
|
||||||
Height = 17
|
Height = 17
|
||||||
Top = 35
|
Top = 35
|
||||||
Width = 89
|
Width = 88
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Sourse dataset'
|
Caption = 'Sourse dataset'
|
||||||
FocusControl = DataSetList
|
FocusControl = DataSetList
|
||||||
@ -37,17 +37,18 @@ object SelectDataSetForm: TSelectDataSetForm
|
|||||||
end
|
end
|
||||||
object DataSetList: TListBox
|
object DataSetList: TListBox
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideTop.Control = Label1
|
AnchorSideTop.Control = ListFilterEdit1
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = ButtonPanel1
|
AnchorSideBottom.Control = ButtonPanel1
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 199
|
Height = 174
|
||||||
Top = 58
|
Top = 87
|
||||||
Width = 388
|
Width = 388
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Left = 6
|
||||||
|
BorderSpacing.Right = 6
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
OnDblClick = ListBox1DblClick
|
OnDblClick = ListBox1DblClick
|
||||||
OnKeyPress = ListBox1KeyPress
|
OnKeyPress = ListBox1KeyPress
|
||||||
@ -57,8 +58,8 @@ object SelectDataSetForm: TSelectDataSetForm
|
|||||||
end
|
end
|
||||||
object ButtonPanel1: TButtonPanel
|
object ButtonPanel1: TButtonPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 46
|
Height = 42
|
||||||
Top = 263
|
Top = 267
|
||||||
Width = 388
|
Width = 388
|
||||||
OKButton.Name = 'OKButton'
|
OKButton.Name = 'OKButton'
|
||||||
OKButton.DefaultCaption = True
|
OKButton.DefaultCaption = True
|
||||||
@ -71,4 +72,25 @@ object SelectDataSetForm: TSelectDataSetForm
|
|||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
ShowButtons = [pbOK, pbCancel, pbHelp]
|
ShowButtons = [pbOK, pbCancel, pbHelp]
|
||||||
end
|
end
|
||||||
|
object ListFilterEdit1: TListFilterEdit
|
||||||
|
AnchorSideLeft.Control = Owner
|
||||||
|
AnchorSideTop.Control = Label1
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = Owner
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 29
|
||||||
|
Top = 58
|
||||||
|
Width = 388
|
||||||
|
ButtonWidth = 23
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Left = 6
|
||||||
|
BorderSpacing.Right = 6
|
||||||
|
NumGlyphs = 1
|
||||||
|
MaxLength = 0
|
||||||
|
Spacing = 0
|
||||||
|
TabOrder = 3
|
||||||
|
Text = 'listfilteredit1'
|
||||||
|
FilteredListbox = DataSetList
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -37,7 +37,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||||
Buttons, ComponentEditors, DB, ButtonPanel;
|
Buttons, ComponentEditors, ListFilterEdit, DB, ButtonPanel;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -48,6 +48,7 @@ type
|
|||||||
CheckBox1: TCheckBox;
|
CheckBox1: TCheckBox;
|
||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
DataSetList: TListBox;
|
DataSetList: TListBox;
|
||||||
|
ListFilterEdit1: TListFilterEdit;
|
||||||
procedure CheckBox1Change(Sender: TObject);
|
procedure CheckBox1Change(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure ListBox1DblClick(Sender: TObject);
|
procedure ListBox1DblClick(Sender: TObject);
|
||||||
@ -80,10 +81,10 @@ type
|
|||||||
|
|
||||||
function SelectDataSet(ADesigner: TComponentEditorDesigner; const ACaption: string;
|
function SelectDataSet(ADesigner: TComponentEditorDesigner; const ACaption: string;
|
||||||
ExcludeDataSet: TDataSet): TDataSet;
|
ExcludeDataSet: TDataSet): TDataSet;
|
||||||
|
{
|
||||||
var
|
var
|
||||||
SelectDataSetForm: TSelectDataSetForm;
|
SelectDataSetForm: TSelectDataSetForm;
|
||||||
|
}
|
||||||
implementation
|
implementation
|
||||||
uses rxmemds, rxdconst;
|
uses rxmemds, rxdconst;
|
||||||
|
|
||||||
@ -138,8 +139,10 @@ var
|
|||||||
Component, F: TComponent;
|
Component, F: TComponent;
|
||||||
begin
|
begin
|
||||||
DataSetList.Items.BeginUpdate;
|
DataSetList.Items.BeginUpdate;
|
||||||
|
ListFilterEdit1.Items.BeginUpdate;
|
||||||
try
|
try
|
||||||
DataSetList.Clear;
|
DataSetList.Clear;
|
||||||
|
ListFilterEdit1.Items.Clear;
|
||||||
FExclude := '';
|
FExclude := '';
|
||||||
if ExcludeDataSet <> nil then FExclude := ExcludeDataSet.Name;
|
if ExcludeDataSet <> nil then FExclude := ExcludeDataSet.Name;
|
||||||
|
|
||||||
@ -168,21 +171,24 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
ListFilterEdit1.ResetFilter;
|
||||||
with DataSetList do
|
with DataSetList do
|
||||||
begin
|
begin
|
||||||
if Items.Count > 0 then ItemIndex := 0;
|
if Items.Count > 0 then ItemIndex := 0;
|
||||||
Enabled := Items.Count > 0;
|
Enabled := ListFilterEdit1.Items.Count > 0;
|
||||||
ButtonPanel1.OKButton.Enabled:= (ItemIndex >= 0);
|
ButtonPanel1.OKButton.Enabled:= (ItemIndex >= 0);
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
DataSetList.Items.EndUpdate;
|
DataSetList.Items.EndUpdate;
|
||||||
|
ListFilterEdit1.Items.EndUpdate;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSelectDataSetForm.AddDataSet(const S: string; ADS: TDataSet);
|
procedure TSelectDataSetForm.AddDataSet(const S: string; ADS: TDataSet);
|
||||||
begin
|
begin
|
||||||
if (S <> '') and (S <> FExclude) then
|
if (S <> '') and (S <> FExclude) then
|
||||||
DataSetList.Items.AddObject(S, ADS);
|
//DataSetList.Items.AddObject(S, ADS);
|
||||||
|
ListFilterEdit1.Items.AddObject(S, ADS);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TMemDataSetEditor }
|
{ TMemDataSetEditor }
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
Copyright (c) 1998 Master-Bank
|
Copyright (c) 1998 Master-Bank
|
||||||
translate to Lazarus by alexs in 2005 - 2021"/>
|
translate to Lazarus by alexs in 2005 - 2021"/>
|
||||||
<License Value="LGPL"/>
|
<License Value="LGPL"/>
|
||||||
<Version Major="3" Minor="4" Release="1" Build="234"/>
|
<Version Major="3" Minor="4" Release="1" Build="235"/>
|
||||||
<Files Count="70">
|
<Files Count="70">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="registerrx.pas"/>
|
<Filename Value="registerrx.pas"/>
|
||||||
@ -330,20 +330,23 @@ translate to Lazarus by alexs in 2005 - 2021"/>
|
|||||||
<EnableI18N Value="True"/>
|
<EnableI18N Value="True"/>
|
||||||
<OutDir Value="languages"/>
|
<OutDir Value="languages"/>
|
||||||
</i18n>
|
</i18n>
|
||||||
<RequiredPkgs Count="4">
|
<RequiredPkgs Count="5">
|
||||||
<Item1>
|
<Item1>
|
||||||
<PackageName Value="rxtools"/>
|
<PackageName Value="LazControlDsgn"/>
|
||||||
</Item1>
|
</Item1>
|
||||||
<Item2>
|
<Item2>
|
||||||
<PackageName Value="FCL"/>
|
<PackageName Value="rxtools"/>
|
||||||
<MinVersion Major="1" Valid="True"/>
|
|
||||||
</Item2>
|
</Item2>
|
||||||
<Item3>
|
<Item3>
|
||||||
<PackageName Value="IDEIntf"/>
|
<PackageName Value="FCL"/>
|
||||||
|
<MinVersion Major="1" Valid="True"/>
|
||||||
</Item3>
|
</Item3>
|
||||||
<Item4>
|
<Item4>
|
||||||
<PackageName Value="LCL"/>
|
<PackageName Value="IDEIntf"/>
|
||||||
</Item4>
|
</Item4>
|
||||||
|
<Item5>
|
||||||
|
<PackageName Value="LCL"/>
|
||||||
|
</Item5>
|
||||||
</RequiredPkgs>
|
</RequiredPkgs>
|
||||||
<UsageOptions>
|
<UsageOptions>
|
||||||
<UnitPath Value="$(PkgOutDir)"/>
|
<UnitPath Value="$(PkgOutDir)"/>
|
||||||
|
Reference in New Issue
Block a user