SetMouseEvents()

Last post 05-13-2005, 11:03 AM by mpsUser. 2 replies.
Sort Posts: Previous Next
  •  05-12-2005, 1:41 PM 6625

    SetMouseEvents()

    I'm adding a custom button to the toolbar; but SetMouseEvents() causes a compile error ("member does not exist in the class or namespace").  I've looked at the document and a couple of examples and it looks correct to me.  I've posted my code below.  Let me know what I'm doing wrong.

    Thanks!!!
     
    C#
    System.Web.UI.WebControls.Image PageBreak = new System.Web.UI.WebControls.Image ();
    PageBreak.ID = "PBreak";
    // This ID will be used in template
    PageBreak.ToolTip = "Insert Page Break";
    PageBreak.ImageUrl = "~/CuteEditor_Files/images/PageBreak.gif";
    PageBreak.CssClass = "CuteEditorButton";
    SetMouseEvents(PageBreak);
    PageBreak.Attributes.Add("onclick","insertHTML('" +
    this.ClientID + "_editBox', '" + HTMLPageBreak + "')");
    PageBreak.Attributes.Add("type","button");
    this.RegisterCustomButton("PageBreak", PageBreak);
    this.ToolControls["InsertPageBreakHolder"].Control.Controls.Add(PageBreak);
  •  05-13-2005, 10:38 AM 6656 in reply to 6625

    Re: SetMouseEvents()

    mpsUser,

    Does the following code exist in your page??

     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()";
     }
     

    Keep me posted


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  05-13-2005, 11:03 AM 6658 in reply to 6656

    Re: SetMouseEvents()

    No, but I added it and that works.  Thanks for the quick response!

    The documentation makes it look like this is a method for the object.  Is it supposed to be there?
    Thanks again!
View as RSS news feed in XML