populating dropdown text list problem

Last post 12-10-2005, 4:35 PM by Adam. 8 replies.
Sort Posts: Previous Next
  •  11-29-2005, 8:59 AM 13170

    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!
  •  12-01-2005, 6:53 AM 13263 in reply to 13170

    Re: populating dropdown text list problem

    it's also not showing the default word 'font' - it just defaults to arial???? Still awaiting reply????????????
  •  12-04-2005, 6:06 AM 13349 in reply to 13263

    Re: populating dropdown text list problem

    still waiting????????????
  •  12-04-2005, 7:13 PM 13358 in reply to 13170

    Re: populating dropdown text list problem

    Try the code below:
     
                   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("Tahoma", "Tahoma") 
                        dropdown.Items.Add("<span style='font-family:Tahoma;font-size:12pt'>Tahoma</span>", "Tahoma", Tahoma") 
                    End If

    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

  •  12-05-2005, 6:32 AM 13382 in reply to 13358

    Re: populating dropdown text list problem

    No joy adam. I don't know how I'm ever going to go live with this.... I only wanted a basic editor and this seems to have such problems every time I choose to get the latest version.

    I'm using: 
    If Not txtDescription.ToolControls("FontName") Is Nothing Then
    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("Courier", "Courier")
    dropdown.Items.Add("Georgia", "Georgia")
    dropdown.Items.Add("Times", "Times New Roman")
    dropdown.Items.Add("Verdana", "Verdana")
    End If
    and it shows Arial if I click outside the box and Times if I click inside the box and no changes at all if I select text and change text !!!!!!!!!
     
    ?????????????

    Nick
     
     
  •  12-06-2005, 10:37 AM 13453 in reply to 13382

    Re: populating dropdown text list problem

    answer please?????????????????
  •  12-07-2005, 2:31 AM 13495 in reply to 13453

    Re: populating dropdown text list problem

    please address my enquiry!
  •  12-10-2005, 12:32 AM 13662 in reply to 13495

    Re: populating dropdown text list problem

    and waiting............
  •  12-10-2005, 4:35 PM 13677 in reply to 13382

    Re: populating dropdown text list problem

    The code looks ok to me.
     
    >> it shows Arial if I click outside the box

    It looks like the content you click is using the Arial font.

    >>Times if I click inside the box

    If you don't use Editor.EditorWysiwygModeCss Property to specify the location of the style sheet that will be used by the editable area.  By default, browser will use the Times by defaul. That's why the fontname dropdown shows the Times.

    >>and no changes at all if I select text and change text !!!!!!!!!

    Not sure what you mean. Can you create an example and show me the steps to reproduce the problems.








     

    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

View as RSS news feed in XML