Jump to content

HtmlMemo Add Button To ToolBar - How


andyhill

Recommended Posts

Please advise how to add (or insert) button on HtmlMemo ToolBar - Thanks.

 

    UniSession.AddJS('fMain.HTMLMemo.toolbar.insert(2, '+
    '{ '+
       'xtype: "spacer"'+
    '} );');

    UniSession.AddJS('fMain.HTMLMemo.toolbar.insert(3, '+
    '{ '+
       'xtype: "button", '+
       'text: '+QuotedStr('Today')+', '+
       'id: "syncTodayID", '+
       'listeners: {tap: function(el, v) {ajaxRequest(fMain.form, "_syncToday", [])}}'+
    '} );');
 

Does nothing ?

 

Link to comment
Share on other sites

Thank you for your reply.

My code:-

  HtmlMemo.ClientEvents.ExtEvents.Clear;
  //
  s:= 'beforeInit=function beforeInit(sender, config) '+
      '{ '+
      '  config.listeners = '+
      '  { '+
      '    render: function(editor) '+
      '    { '+

//      '      editor.getToolbar().add( '+
//      '      { '+
//      '        xtype: ''separator'' '+
//      '      }); , '+

      '      editor.getToolbar().add( '+
      '      { '+
      '        xtype: ''button'', '+
      '        text: ''Process'', '+
      '        handler: function() '+
      '        { '+
      '          ajaxRequest(sender, ''process'', []) '+
      '        } '+
      '      }); '+

      '    } '+
      '  } '+
      '} ';
  HtmlMemo.ClientEvents.ExtEvents.Add(s);

Does nothing (ver 1531), also want separator before it and an icon on the button.

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...