Jump to content

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


Recommended Posts

Posted

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.

Posted
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);}}}';
 

Posted

Hi

maybe this can help you

UniPanel1.ClientEvents.UniEvents.Values['beforeInit'] := 'function (sender, config) {config.cls="myrow"}';

 

 

Posted
12 hours ago, Israel Portillo said:

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

Hello,

Also you can use:

UniPanel.JSInterface.JSConfig('cls', ['myrow']);

 

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...