Re: Custom button command

  •  09-14-2006, 1:56 PM

    Re: Custom button command

    Adam:
     
    Try the following code:

       System.Web.UI.WebControls.Image Image2 = new System.Web.UI.WebControls.Image();
       Image2.ToolTip    = "Using oncommand";
       Image2.ImageUrl    = "tools.gif";
       Image2.CssClass    = "CuteEditorButton";
       SetMouseEvents(Image2);
       tc.Control.Controls.Add(Image2);
     

     void SetMouseEvents(WebControl control)
     {
         control.Attributes["onmouseover"]="CuteEditor_ButtonCommandOver(this)";
         control.Attributes["onmouseout"]="CuteEditor_ButtonCommandOut(this)";
         control.Attributes["onmousedown"]="CuteEditor_ButtonCommandDown(this)";
         control.Attributes["onmouseup"]="CuteEditor_ButtonCommandUp(this)";
         control.Attributes["ondragstart"]="CuteEditor_CancelEvent()";
     }
     


    Where does tc come from?
View Complete Thread