I manage it by myself.
unit Unit3;
interface
uses fr_dbtoolbar,Vcl.ImgList,dm_rdbaction, dm_rimages,rDBGrid, rDBGrid_MS,
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Data.DB, Vcl.Grids, Vcl.DBGrids;
type
TForm3 = class(TForm)
rDBGrid_MS1: TrDBGrid_MS;
procedure FormCreate(Sender: TObject);
procedure EnsureRosiModules;
procedure EnsureImagesBar;
private
FBar :TrDBToolBar;
public
{ Public declarations }
end;
var
Form3: TForm3;
implementation
{$R *.dfm}
procedure TForm3.FormCreate(Sender: TObject);
begin
FBar := TrDBToolBar.Create(Self);
FBar.Parent := Self;
EnsureRosiModules;
EnsureImagesBar;
rDBAction.SetActiveGrid(rDBGrid_MS1);
//rDBGrid_MS1.DataSource:= <-- set here your datasource
end;
procedure TForm3.EnsureRosiModules;
begin
if rImages = nil then
Application.CreateForm(TrImages, rImages);
if rDBAction = nil then
Application.CreateForm(TrDBAction, rDBAction);
end;
procedure TForm3.EnsureImagesBar;
var
IL: TCustomImageList;
C: TComponent;
begin
if Assigned(rDBAction) and Assigned(rDBAction.ActList.Images) then
FBar.rDBtbTool.Images := rDBAction.ActList.Images
else
if Assigned(rImages) then begin
C := rImages.FindComponent('ImageList16');
if C is TImageList then
begin
FBar.rDBtbTool.Images := TImageList(C);
if Assigned(rDBAction) and (rDBAction.ActList.Images = nil) then
rDBAction.ActList.Images := TImageList(C);
end;
end;
end;
end.