Jump to content

ClientEvent -> UniEvent runtime creation


N.Marzio

Recommended Posts

How is it possible to create a ClientEvent-> UniEvent on TUniButtons at Runtime?

I tried on the creation of the Form but it doesn't work ...

TMainForm.UniFormShow procedures (Sender: TObject);
begin
   UniButton14.ClientEvents.UniEvents.AddPair ('beforeInit',
                          'function beforeInit (sender, config)'
                         + '{'
                         + 'config.baseCls = "btn"; '
                         + 'config.cls = "btn-secondary"'
                         + '}'
                         + 'end; ');
end;

While if I insert the codes to DesignTime it works perfectly.

Thanks

Edited by marzio
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...