Jump to content

beforeInit


picyka

Recommended Posts

Hello everyone, is there any place where I can intercept the creation of the component, and set a rule in this event, I say this in a globar way, as we have the event "UniGUIMainModuleNewComponent"

Example of use:

 

procedure TUniMainModule.UniGUIMainModuleNewComponent(AComponent: TComponent);
begin
  if AComponent is TfrxReport then
    (AComponent as TfrxReport).EngineOptions.UseGlobalDataSetList := False
  else
  if AComponent is TUniCustomDateTimePicker then
    if TUniDateTimePicker(AComponent).Tag = 0 then
      TUniDateTimePicker(AComponent).ConfigureFormatDate
  else
  if AComponent is TUniDBGrid then
  begin
    TUniDBGrid(AComponent).ConfigureEnableTextSelection;
    TUniDBGrid(AComponent).ConfirureOpacity;
    TUniDBGrid(AComponent).ConfigureZebra;
  end;
end;

 

Grateful for the attention.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...