Re: Custom button

  •  12-10-2013, 10:10 AM

    Re: Custom button

     Jeff,

     

    I don't think you took the time to read to example I gave you. I am trying to use a custom image on my button. The image is not located in the RTE path. The image in my example was http://mysite.com/image/myimage.jpg

     

    Please note that this was very easily done in CE 6 with C# code similar to this:

     

     
    1. private static void ConfigureCustomEditorButton(CE.ToolControl button, string tooltip, string imageUrl, string cssClass, string onClick)  
    2. {  
    3.     if (button == nullreturn;  
    4.   
    5.     using (var image = new Image())  
    6.     {  
    7.         image.ToolTip = tooltip;  
    8.         image.ImageUrl = imageUrl;  
    9.         image.CssClass = cssClass;  
    10.         image.Attributes["onmouseover"] = "CuteEditor_ButtonCommandOver(this)";  
    11.         image.Attributes["onmouseout"] = "CuteEditor_ButtonCommandOut(this)";  
    12.         image.Attributes["onmousedown"] = "CuteEditor_ButtonCommandDown(this)";  
    13.         image.Attributes["onmouseup"] = "CuteEditor_ButtonCommandUp(this)";  
    14.         image.Attributes["ondragstart"] = "CuteEditor_CancelEvent()";  
    15.         image.Attributes["onclick"] = onClick;  
    16.         button.Control.Controls.Add(image);  
    17.     }  
    18. }  
     
View Complete Thread