Duplicate buttons

  •  02-09-2004, 8:05 AM

    Duplicate buttons

    Hi !

    I'm a new customer since last friday, and I have been working around CuteEditor during all week-end. Sofar, it looks really great.  I was able to add buttons, and stuff, but I have a strange behavior when I try to add buttons to the toolbar by hand, instead of using the template. Here is some code :

     

    test_editor.vb


    ' VB Document
    Imports System.Web.UI.WebControls
    Imports CuteEditor

    Public Class test_editor
        Inherits System.Web.UI.Page

     public Editor1 as Editor
     protected withevents btnSave as button
     
     Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
       Editor1.toolbar.Add(Editor1.Bold)
     end sub 
     
     Public Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
      'do nothing
     End sub
    End Class

     

    test_editor.aspx


    <%@ Page Language="vb" Inherits="test_editor" Src="test_editor.vb"  %>
    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
    <form name="myForm"  runat="server" >
    <CE:Editor Visible="true" id="Editor1"  runat="server"  Template="G_End"></CE:Editor>
    <br>
    <input type="submit"  runat="server" name="btnSave" onServerClick="btnSave_Click" class="texte" value="Save" >
    </form>
    </body>
    </html>


     

    as you can see I insert only one button: the bold one.

    I get this result :

    I have cut the image, but you see, I get twice the B !

    Did I do something wrong ?

    Thanks in advance for any help !

    Julien

View Complete Thread