Custom button problem

  •  08-10-2009, 9:17 AM

    Custom button problem

    I am tring to add a custom button but I get 2 buttons se image attached. I am adding it through the code as follows:
    1. CuteEditor.ToolControl tc = txtHTMLFile.ToolControls["RapaportImage"];   
    2.         if (tc != null)   
    3.         {   
    4.             Image Image1 = new Image();   
    5.             Image1.ToolTip = "Insert today's date";   
    6.             Image1.ImageUrl = "rapaport_370x48px.jpg";   
    7.             Image1.CssClass = "CuteEditorButton";   
    8.             Image1.Height = Unit.Pixel(15);   
    9.             SetMouseEvents(Image1);   
    10.             Image1.Attributes["onclick"] = "alert('hello');";   
    11.             tc.Control.Controls.Add(Image1);   
    12.         }  
    and referring to the button through a config file:
    1. <CE:Editor    
    2.   ConfigurationPath="~/CuteSoft_Client/CuteEditor/Configuration/AutoConfigure/Templates.config"  
    3.   Height="560px" ID="txtHTMLFile" Width="100%" EnableContextMenu="false" runat="server" 
    4.   ResizeMode="None" BreakElement="Br" />  
    in the file I put the following:
    1. <toolbars>  
    2. <item type="image" name="RapaportImage" />  
    the problem:
     
    Thanks for your help
     
    Eli
View Complete Thread