Re: problems when adding custom buttons

  •  01-26-2006, 2:57 AM

    Re: problems when adding custom buttons

    Another thing to note is that the editor is dynamically rendered to the page.

    heres the code



    Dim ctrlImagePicker As System.Web.UI.WebControls.WebControl

    ctrlImagePicker = editor.CreateCommandButton("compassInsertImage", "image.gif", "Image Picker")

    ctrlImagePicker.Attributes("onclick") = "OpenImageBank('/imagebank.aspx',this);"

    Dim pos As Integer

    pos = editor.ToolControls.IndexOf("BoxFormatting") + 1

    editor.InsertToolControl(pos, "compassInsertImage", ctrlImagePicker)

View Complete Thread