You've already forked lazarus-ccr
RxFPC:add property Enabled for all RxDBGrid tools
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6167 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -74,8 +74,7 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="RxDBGridMainUnit"/>
|
||||
<TopLine Value="152"/>
|
||||
<CursorPos X="138" Y="188"/>
|
||||
<CursorPos X="31" Y="28"/>
|
||||
<UsageCount Value="130"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
@ -477,13 +476,14 @@
|
||||
</Unit56>
|
||||
<Unit57>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="5415"/>
|
||||
<CursorPos Y="5428"/>
|
||||
<TopLine Value="1143"/>
|
||||
<CursorPos X="15" Y="1162"/>
|
||||
<UsageCount Value="12"/>
|
||||
<Bookmarks Count="2">
|
||||
<Item0 X="3" Y="7315" ID="1"/>
|
||||
<Item1 X="17" Y="4357" ID="2"/>
|
||||
<Item0 X="3" Y="7324" ID="1"/>
|
||||
<Item1 X="17" Y="4366" ID="2"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
</Unit57>
|
||||
@ -514,7 +514,6 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="RxDBGrid_PopUpFilterUnit"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<TopLine Value="216"/>
|
||||
<CursorPos X="3" Y="224"/>
|
||||
@ -634,8 +633,8 @@
|
||||
<Filename Value="../../../rxdbgrid_export_spreadsheet/rxdbgridexportspreadsheet.pas"/>
|
||||
<UnitName Value="RxDBGridExportSpreadSheet"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<TopLine Value="160"/>
|
||||
<CursorPos X="3" Y="142"/>
|
||||
<TopLine Value="40"/>
|
||||
<CursorPos X="3" Y="59"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit76>
|
||||
@ -643,123 +642,122 @@
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="232" TopLine="216"/>
|
||||
<Caret Line="234" TopLine="216"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="234" TopLine="216"/>
|
||||
<Caret Line="235" TopLine="216"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="235" TopLine="216"/>
|
||||
<Caret Line="236" TopLine="216"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="236" TopLine="216"/>
|
||||
<Caret Line="232" TopLine="216"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="232" TopLine="216"/>
|
||||
<Caret Line="234" TopLine="216"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="234" TopLine="216"/>
|
||||
<Caret Line="235" TopLine="216"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="235" TopLine="216"/>
|
||||
<Caret Line="236" TopLine="216"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="236" TopLine="216"/>
|
||||
<Caret Line="232" TopLine="216"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="232" TopLine="216"/>
|
||||
<Caret Line="234" TopLine="216"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="234" TopLine="216"/>
|
||||
<Caret Line="235" TopLine="216"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="235" TopLine="216"/>
|
||||
<Caret Line="236" TopLine="216"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="236" TopLine="216"/>
|
||||
<Caret Line="232" TopLine="216"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="232" TopLine="216"/>
|
||||
<Caret Line="234" TopLine="216"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="234" TopLine="216"/>
|
||||
<Caret Line="235" TopLine="216"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="235" TopLine="216"/>
|
||||
<Caret Line="236" TopLine="216"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="236" TopLine="216"/>
|
||||
<Caret Line="232" TopLine="216"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="232" TopLine="216"/>
|
||||
<Caret Line="240" TopLine="216"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="234" TopLine="216"/>
|
||||
<Caret Line="243" TopLine="216"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="235" TopLine="216"/>
|
||||
<Caret Line="246" TopLine="216"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="236" TopLine="216"/>
|
||||
<Caret Line="241" Column="22" TopLine="216"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="232" TopLine="216"/>
|
||||
<Caret Line="248" Column="39" TopLine="216"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="234" TopLine="216"/>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
<Caret Line="188" Column="138" TopLine="152"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="235" TopLine="216"/>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="236" TopLine="216"/>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
<Caret Line="28" Column="31"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="232" TopLine="216"/>
|
||||
<Filename Value="../../../rxdbgrid_export_spreadsheet/rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="59" Column="3" TopLine="40"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="240" TopLine="216"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="1182" Column="61" TopLine="1151"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="243" TopLine="216"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="2340" Column="3" TopLine="2338"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="246" TopLine="216"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="1182" Column="15" TopLine="1164"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="241" Column="22" TopLine="216"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="1162" Column="15" TopLine="1143"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="248" Column="39" TopLine="216"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="2341" Column="3" TopLine="2338"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="10"/>
|
||||
<Version Value="11"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
@ -17,9 +17,10 @@
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="1">
|
||||
<Mode0 Name="default"/>
|
||||
</Modes>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="3">
|
||||
<Item1>
|
||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -11,32 +11,47 @@ object Form1: TForm1
|
||||
LCLVersion = '1.9.0.0'
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 37
|
||||
Top = 360
|
||||
Height = 50
|
||||
Top = 347
|
||||
Width = 1043
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
ClientHeight = 37
|
||||
ClientHeight = 50
|
||||
ClientWidth = 1043
|
||||
TabOrder = 0
|
||||
object Button1: TButton
|
||||
AnchorSideLeft.Control = Panel1
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
AnchorSideTop.Control = Panel1
|
||||
Left = 481
|
||||
Height = 23
|
||||
Left = 477
|
||||
Height = 36
|
||||
Top = 7
|
||||
Width = 81
|
||||
Width = 88
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Create PDF'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 0
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
AnchorSideLeft.Control = Button1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Panel1
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 571
|
||||
Height = 24
|
||||
Top = 13
|
||||
Width = 105
|
||||
Caption = 'Enable tools'
|
||||
Checked = True
|
||||
OnChange = CheckBox1Change
|
||||
State = cbChecked
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object PageControl1: TPageControl
|
||||
Left = 0
|
||||
Height = 360
|
||||
Height = 347
|
||||
Top = 0
|
||||
Width = 1043
|
||||
ActivePage = TabSheet1
|
||||
@ -45,13 +60,13 @@ object Form1: TForm1
|
||||
TabOrder = 1
|
||||
object TabSheet1: TTabSheet
|
||||
Caption = 'Test data'
|
||||
ClientHeight = 334
|
||||
ClientWidth = 1035
|
||||
ClientHeight = 313
|
||||
ClientWidth = 1033
|
||||
object RxDBGrid1: TRxDBGrid
|
||||
Left = 0
|
||||
Height = 334
|
||||
Height = 313
|
||||
Top = 0
|
||||
Width = 1035
|
||||
Width = 1033
|
||||
ColumnDefValues.BlobText = '(данные)'
|
||||
TitleButtons = True
|
||||
AutoSort = True
|
||||
@ -63,10 +78,9 @@ object Form1: TForm1
|
||||
Width = 50
|
||||
FieldName = 'ID'
|
||||
EditButtons = <>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
@ -80,10 +94,9 @@ object Form1: TForm1
|
||||
Width = 120
|
||||
FieldName = 'PDATE'
|
||||
EditButtons = <>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
@ -98,10 +111,9 @@ object Form1: TForm1
|
||||
Width = 364
|
||||
FieldName = 'NAME'
|
||||
EditButtons = <>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
@ -133,10 +145,9 @@ object Form1: TForm1
|
||||
Width = 100
|
||||
FieldName = 'SUM'
|
||||
EditButtons = <>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
@ -172,10 +183,9 @@ object Form1: TForm1
|
||||
Width = 60
|
||||
FieldName = 'FLAG'
|
||||
EditButtons = <>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
@ -196,10 +206,9 @@ object Form1: TForm1
|
||||
Width = 200
|
||||
FieldName = 'Country'
|
||||
EditButtons = <>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
@ -212,10 +221,9 @@ object Form1: TForm1
|
||||
Width = 200
|
||||
FieldName = 'Sity'
|
||||
EditButtons = <>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.NotEmptyValue = '(Не пусто)'
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
@ -295,7 +303,6 @@ object Form1: TForm1
|
||||
DataSource = DataSource1
|
||||
Flat = True
|
||||
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgHeaderPushedLook]
|
||||
ParentColor = False
|
||||
TabOrder = 0
|
||||
TitleStyle = tsNative
|
||||
end
|
||||
@ -396,8 +403,6 @@ object Form1: TForm1
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
MaxValue = 0
|
||||
MinValue = 0
|
||||
Precision = 2
|
||||
end
|
||||
object RxMemoryData1Country: TStringField
|
||||
@ -438,6 +443,7 @@ object Form1: TForm1
|
||||
object RxDBGridExportPDF1: TRxDBGridExportPDF
|
||||
RxDBGrid = RxDBGrid1
|
||||
Caption = 'Export to PDF file'
|
||||
Enabled = True
|
||||
FileName = 'test111.pdf'
|
||||
Options = [repExportTitle, repExportColors, repExportFooter, repOverwriteExisting, repExportImages]
|
||||
PdfOptions.PaperOrientation = ppoLandscape
|
||||
@ -554,5 +560,8 @@ object Form1: TForm1
|
||||
0000000000000000000000000000000000FF0000000000000000000000000000
|
||||
0000000000000000000000000000
|
||||
}
|
||||
BitmapAdv = {
|
||||
4C6900000000
|
||||
}
|
||||
end
|
||||
end
|
||||
|
@ -15,6 +15,7 @@ type
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Button1: TButton;
|
||||
CheckBox1: TCheckBox;
|
||||
DataSource1: TDataSource;
|
||||
ImageList1: TImageList;
|
||||
Memo1: TMemo;
|
||||
@ -33,6 +34,7 @@ type
|
||||
TabSheet1: TTabSheet;
|
||||
TabSheet2: TTabSheet;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure CheckBox1Change(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
@ -139,6 +141,11 @@ begin
|
||||
RxDBGridExportPDF1.ShowSetupForm:=true;
|
||||
end;
|
||||
|
||||
procedure TForm1.CheckBox1Change(Sender: TObject);
|
||||
begin
|
||||
RxDBGridExportPDF1.Enabled:=CheckBox1.Checked;
|
||||
end;
|
||||
|
||||
procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
FreeAndNil(FontDirList);
|
||||
|
@ -876,6 +876,7 @@ type
|
||||
procedure DoSetColEdtBtn;
|
||||
procedure AddTools(ATools:TRxDBGridAbstractTools);
|
||||
procedure RemoveTools(ATools:TRxDBGridAbstractTools);
|
||||
procedure UpdateToolsState(ATools:TRxDBGridAbstractTools);
|
||||
|
||||
procedure OnDataSetScrolled(aDataSet:TDataSet; Distance: Integer);
|
||||
procedure FillFilterData;
|
||||
@ -1154,10 +1155,12 @@ type
|
||||
|
||||
TRxDBGridAbstractTools = class(TComponent)
|
||||
private
|
||||
FEnabled: boolean;
|
||||
FOnAfterExecute: TNotifyEvent;
|
||||
FOnBeforeExecute: TNotifyEvent;
|
||||
FShowSetupForm: boolean;
|
||||
procedure ExecTools(Sender:TObject);
|
||||
procedure SetEnabled(AValue: boolean);
|
||||
protected
|
||||
FRxDBGrid: TRxDBGrid;
|
||||
FCaption:string;
|
||||
@ -1177,6 +1180,7 @@ type
|
||||
property ShowSetupForm:boolean read FShowSetupForm write FShowSetupForm default false;
|
||||
property OnBeforeExecute:TNotifyEvent read FOnBeforeExecute write FOnBeforeExecute;
|
||||
property OnAfterExecute:TNotifyEvent read FOnAfterExecute write FOnAfterExecute;
|
||||
property Enabled:boolean read FEnabled write SetEnabled default true;
|
||||
end;
|
||||
|
||||
procedure RegisterRxDBGridSortEngine(RxDBGridSortEngineClass: TRxDBGridSortEngineClass;
|
||||
@ -2332,12 +2336,20 @@ begin
|
||||
Execute;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridAbstractTools.SetEnabled(AValue: boolean);
|
||||
begin
|
||||
if FEnabled=AValue then Exit;
|
||||
FEnabled:=AValue;
|
||||
FRxDBGrid.UpdateToolsState(Self);
|
||||
end;
|
||||
|
||||
constructor TRxDBGridAbstractTools.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FToolsEvents:=[];
|
||||
FCaption:=Name;
|
||||
FShowSetupForm:=false;
|
||||
FEnabled:=true;
|
||||
end;
|
||||
|
||||
destructor TRxDBGridAbstractTools.Destroy;
|
||||
@ -4065,6 +4077,8 @@ var
|
||||
i:integer;
|
||||
R: TMenuItem;
|
||||
begin
|
||||
if not Assigned(ATools) then Exit;
|
||||
|
||||
for i:=8 to F_PopupMenu.Items.Count - 1 do
|
||||
if F_PopupMenu.Items[i].Tag = IntPtr(ATools) then
|
||||
exit;
|
||||
@ -4074,6 +4088,7 @@ begin
|
||||
R.Caption := ATools.FCaption;
|
||||
R.OnClick := @(ATools.ExecTools);
|
||||
R.Tag:=IntPtr(ATools);
|
||||
R.Enabled:=ATools.Enabled;
|
||||
|
||||
if Assigned(FToolsList) and (FToolsList.IndexOf(ATools)<0) then
|
||||
FToolsList.Add(ATools);
|
||||
@ -4097,6 +4112,19 @@ begin
|
||||
FToolsList.Remove(ATools);
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.UpdateToolsState(ATools: TRxDBGridAbstractTools);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
if not Assigned(ATools) then Exit;
|
||||
for i:=8 to F_PopupMenu.Items.Count - 1 do
|
||||
if F_PopupMenu.Items[i].Tag = IntPtr(ATools) then
|
||||
begin
|
||||
F_PopupMenu.Items[i].Enabled:=ATools.Enabled;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.OnDataSetScrolled(aDataSet: TDataSet; Distance: Integer);
|
||||
begin
|
||||
if Assigned(FSaveOnDataSetScrolled) then
|
||||
|
Reference in New Issue
Block a user