Re: Dropdown item highlighting is not consistent

  •  10-25-2010, 11:07 AM

    Re: Dropdown item highlighting is not consistent

    Dear JPenn,
     
    I have tried the following code, it works fine:
    <%@ Page Language="C#"%>
    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
    <html>
        <head>  
     </head>
     <body>
            <form id="Form1" runat="server">  
       <table cellpadding="15">
        <tr>     
         <td>      
          <CE:Editor id="Editor1"  ThemeType="Office2007" EditCompleteDocument="true"  runat="server" ></CE:Editor><BR>
         </td>
        </tr>
       </table>   
      </form>
     </body>
    </html>
    <script runat="server">
     void Page_Load(object sender, System.EventArgs e)
      {
       if (!IsPostBack)
       {    
           CuteEditor.ToolControl toolctrl=Editor1.ToolControls["FontName"];    
           if(toolctrl!=null)
           {    
           CuteEditor.RichDropDownList dropdown=(CuteEditor.RichDropDownList)toolctrl.Control;    
           //the first item is the caption    
           CuteEditor.RichListItem richitem=dropdown.Items[0];    
           //clear the items from configuration files    
           dropdown.Items.Clear();    
           dropdown.Attributes["RenderItemBorder"]="true";
           //add the caption   
           dropdown.Items.Add(richitem);    
           //add value only
           dropdown.Items.Add("Arial");    
           //add text and value    
           dropdown.Items.Add("Verdana","Verdana");    
           //add html and text and value    
           dropdown.Items.Add("<span style='font-family:Tahoma;font-size:12pt'>Tahoma</span>","Tahoma","Tahoma");    
           }    
         }
        } 
    </script>
    Please double check your code, if issue is still existing, please post your code here, we will check it.
     
    Thank you for asking
View Complete Thread