Is there an "About" button?

Last post 11-21-2008, 12:58 PM by ValleyHope. 4 replies.
Sort Posts: Previous Next
  •  11-20-2008, 2:00 PM 46036

    Is there an "About" button?

    Is there a way to have an "About" button in the toolbar that displays the version number for CuteEditor?
  •  11-21-2008, 9:28 AM 46134 in reply to 46036

    Re: Is there an "About" button?

    To check the control version, please put the mouse over the CuteEditor.dll and read the control's description.
     
    This button doesn't exist.

    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

  •  11-21-2008, 11:23 AM 46147 in reply to 46134

    Re: Is there an "About" button?

    OK, so then how can I create a button that when clicked, opens a "dialog" that displays some information?  I don't want it to insert anything in the text area, but just display some information.
     
    Thanks,
  •  11-21-2008, 11:50 AM 46148 in reply to 46147

    Re: Is there an "About" button?

    Yes, please check the following example:
     
    Add a Cross Browser Modal Dialog Box to Cute Editor

    How to create a custom button(client side) which displays a dialog?( C# | VB )

    This example demonstrates how easy it can be to add your own client side buttons to the CuteEditor by creating a Cross Browser Modal Dialog Box.

     
    The source code of this example is included in the download package.

    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

  •  11-21-2008, 12:58 PM 46151 in reply to 46148

    Re: Is there an "About" button?

    Thanks for the help.  Here is what I've done so I can have an "About CuteSoft" type button in the Toolbar.  The reason I want one is to make it faster for me to determine if the version online is the latest version available, without having to go the webserver and "hover" over the dll file.
     
    I created an About.aspx page in the root of my website with the following code:
     
     <%@ Page Language="C#" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <script runat="server">
        override protected void OnInit(EventArgs args)
        {
            System.Reflection.AssemblyName assemblyName = System.Reflection.AssemblyName.GetAssemblyName("C:\\Projects\\OnlineServices\\OnlineServices\\Bin\\CuteEditor.dll");
            Version version = assemblyName.Version;
            Literal1.Text = "Current Version: " + version + "<br />";
            Literal1.Text += "Major: " + version.Major + "<br />";
            Literal1.Text += "Minor: " + version.Minor + "<br />";
            Literal1.Text += "Build: " + version.Build + "<br />";
            Literal1.Text += "Revision: " + version.Revision;
        }
    </script>
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:Literal ID="Literal1" runat="server"></asp:Literal>
        </div>
        </form>
    </body>
    </html>
     
    In the page I have the editor I added the following bit of BLOCKED SCRIPT
     
    <script language="JavaScript" type="text/javascript">
     function ShowMyDialog(button)
     {
      //use CuteEditor_GetEditor(elementinsidetheEditor) to get the cute editor instance
      var editor=CuteEditor_GetEditor(button);
      //show the dialog page , and pass the editor as newwin.dialogArguments
      //(handler,url,args,feature)
      var newwin=editor.ShowDialog(null,"About.aspx",editor,"dialogWidth:200px;dialogHeight:100px");
     }
    </script>
     
    Then in the codebehind for my page I have:
     
    int pos = Editor1.ToolControls.IndexOf("Zoom") + 1;
    WebControl ctrl = Editor1.CreateCommandButton("aboutButton", "about.gif", "About CuteSoft Editor");
    ctrl.Attributes["onclick"] = "ShowMyDialog(this)";
    Editor1.InsertToolControl(pos, "aboutButton", ctrl);
     
    Finally, I added an "about.gif" image to the Themes/Images folders.
     
    I hope this helps anyone interested.
View as RSS news feed in XML