N.Marzio Posted April 26, 2020 Posted April 26, 2020 (edited) 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 April 26, 2020 by marzio Quote
Sherzod Posted April 26, 2020 Posted April 26, 2020 27 minutes ago, marzio said: Don't Work! procedure TMainForm.UniFormCreate(Sender: TObject); begin with UniButton1.JSInterface do begin JSConfig('baseCls', ['btn']); JSConfig('cls', ['btn-secondary']); end; end; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.