Jump to content

How to assing JS code in a TUnimPanel runtime created for ClientEvents->UniEvents->beforeinit ?


Recommended Posts

8 hours ago, Israel Portillo said:

HI group

I have a design panel with a ClientEvents->UniEvents->beforeinit JS code as:

function beforeInit(sender, config)
{
   config.cls = "myrow";
}

 

How can I assign the same property in a runtime created panel ?

Thanks for your help.

Hi,

I use this when create button at runtime:

MyButton.ClientEvents.ExtEvents.Values['beforeInit'] := 'function beforeInit (sender, config) {sender.listeners = {initialize: function(editor) {var styles = {"word-wrap": "break-word"};Ext.DomHelper.applyStyles(editor.getEditorBody(), styles);}}}';
 

Link to post
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...