Re: Drop down list

  •  12-02-2011, 6:19 AM

    Re: Drop down list

    Hi AndyFel,
     
    Please try the example below, select the "test2" option. Does it still shows the first option on your end?
     
    <%@ Page Language="VB" %>
    <%@ Register Assembly="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <script runat="server">
        Protected Overrides Sub OnLoad(ByVal e As EventArgs)
            Dim container As CuteEditor.ToolControl = Editor1.ToolControls("insertcustombutonhere")
            If container IsNot Nothing Then
                Dim ddlDocType As New CuteEditor.RichDropDownList(Editor1)
                ddlDocType.CssClass = "CuteEditorDropDown"
                ddlDocType.ToolTip = "Select Document Type (DTD)"
                ddlDocType.ID = "ddlDocType"
                ddlDocType.Width = 120
                ddlDocType.Items.Add(New RichListItem("test1", "test1"))
                ddlDocType.Items.Add(New RichListItem("test2", "test2"))
                container.Control.Controls.Add(ddlDocType)
            End If
            MyBase.OnLoad(e)
        End Sub
    </script>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>example</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <CE:Editor ID="Editor1" runat="server">
            </CE:Editor>
        </form>
    </body>
    </html>
     
    Regards,
     
    Ken 
View Complete Thread