populating dropdown text list problem

  •  11-29-2005, 8:59 AM

    populating dropdown text list problem

     My editor:

    <ce:editor id="txtDescription" runat="server" backcolor="White" height="250" width="589" templateitemlist="[FontName],[ForeColor],[Bold,Italic,Underline,Separator,JustifyLeft,JustifyCenter,JustifyRight,Separator,InsertUnorderedList,Indent,Separator,ToFullPage,FromFullPage]"></ce:editor>

    I'm programmatically populating the dropdown fontlist with:

                   If Not txtDescription.ToolControls("FontName") Is Nothing Then
                        Dim dropdown As CuteEditor.RichDropDownList
                        Dim richitem As CuteEditor.RichListItem
                        dropdown = DirectCast(txtDescription.ToolControls("FontName").Control, CuteEditor.RichDropDownList)
                        richitem = dropdown.Items(0) 'the first item is the caption  
                        dropdown.Items.Clear() 'clear the items from configuration files
                        dropdown.Items.Add(richitem) 'add the caption 
                        dropdown.Items.Add("Arial", "Arial")
                        dropdown.Items.Add("Verdana", "Verdana") 
                        dropdown.Items.Add("<span style='font-family:Tahoma;font-size:12pt'>Tahoma</span>", "Tahoma", Tahoma") 
                    End If
     
    and I'm getting various errors when trying to change text. Can you see where I've gone wrong please?
     
    Cheers!
View Complete Thread