Dropdown item highlighting is not consistent

Last post 10-26-2010, 7:47 AM by Eric. 9 replies.
Sort Posts: Previous Next
  •  10-21-2010, 9:59 AM 64559

    Dropdown item highlighting is not consistent

    When I click on the Css Class or Paragraph dropdowns and mouseover the list items, they are each highlighted by a border.  But when I use the Font or Size dropdowns, the highlighting is a dark blue, solid block that makes the black text inside it very hard to read.  At first I thought this caused by something I had misconfigured in my application, but I checked the editor that I'm using to type this post (and the online demos) and they are showing the same behavior.
     
    Is there a bugfix or workaround for this?
     
    Thanks-
    John
     
    (Edit: forgot to mention that I'm using the v6.6 .Net 2.0 version)
    Filed under: , ,
  •  10-21-2010, 8:57 PM 64586 in reply to 64559

    Re: Dropdown item highlighting is not consistent

    Hi JPenn, 
     
    The color matter of the theme of your windows.
     
    XP setting: Display Properties-->Advanced Appearance-->Item-->Selected Items
     
    Regards,
     
    Ken 
  •  10-22-2010, 9:13 AM 64632 in reply to 64586

    Re: Dropdown item highlighting is not consistent

    How can these properties be set programmatically?
  •  10-22-2010, 9:47 AM 64633 in reply to 64632

    Re: Dropdown item highlighting is not consistent

    The problem is that the dropdowns are inconsistently rendered within the same theme.  I have my editor instance set up to use the Office2007 theme, and while the CssClass and Paragraph dropdowns render correctly, the Font and Size dropdowns do not (neither does a custom dropdown that I've added programmatically).
  •  10-22-2010, 1:03 PM 64639 in reply to 64633

    Re: Dropdown item highlighting is not consistent

    Jpenn,
     
    Please modify Toolbar Configuration File.  All the configuration files can be found in the /CuteEditor/Configuration/AutoConfigure folder.
    For example, please open CuteSoft_Client\CuteEditor\Configuration\AutoConfigure\Default.config
     
    and modify
     
    <item type="dropdown" name="FontName" width="110" text="[[FontName]]" command="FontName" />
     
    to:
     
    <item type="dropdown" name="FontName" width="110" RenderItemBorder="true" text="[[FontName]]" command="FontName" />
     
     

    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

  •  10-25-2010, 9:18 AM 64674 in reply to 64639

    Re: Dropdown item highlighting is not consistent

    This worked for the dropdowns that are defined in the config file, but not for the other dropdowns that I am creating programmatically.   I have tried setting the RenderItemBorder property on the RichDropDownList object to true but it had no effect - the item highlighting remained the same (dark blue block).
     
     
  •  10-25-2010, 11:07 AM 64678 in reply to 64674

    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
  •  10-25-2010, 12:23 PM 64679 in reply to 64678

    Re: Dropdown item highlighting is not consistent

    The issue still exists.  The only difference I saw between your editor config and mine is the setting of the EditCompleteDocument property.  I tried setting mine to True but it had no effect.
     
    I didn't see a programmatic setting for RenderItemBorder in your sample, so I'm left to assume it's in your config file?
     
    Here is the placeholder for the dropdown in my custom config file:
     
    <item type="holder" name="variablelist" />
     
    Here is how the dropdown is being instantiated and populated in my custom control:
     
    CuteEditor.Editor richTextBox = new CuteEditor.Editor();
    richTextBox.ConfigurationPath = "~/CuteSoft_Client/CuteEditor/Configuration/custom.config";
    richTextBox.ThemeType = ThemeType.Office2007;
    richTextBox.BreakElement = BreakElement.Br;
    richTextBox.EditCompleteDocument = false;
    richTextBox.EnableStripScriptTags = false;
    richTextBox.AutoParseClasses = false;
    Control container = richTextBox.ToolControls[ "variablelist" ].Control;
    CuteEditor.RichDropDownList ddl = new CuteEditor.RichDropDownList( richTextBox );
    ddl.Items.Add( "Insert Field", "" );
    ddl.RichHideFirstItem = true;
    ddl.RenderItemBorder = true;
    StringDictionary sdict = GetVariableList( var ); // returns dictionary of items from db
    foreach ( string name in sdict )
    {
        ddl.Items.Add( name, sdict[ name ].Value );
    }
    ddl.Attributes[ "onchange" ] = "CuteEditor_DropDownCommand(this,'PasteHTML')";
    container.Controls.Add( ddl );
  •  10-25-2010, 12:42 PM 64680 in reply to 64679

    Re: Dropdown item highlighting is not consistent

    Please disregard my last post - the dropdowns are being rendered correctly now.  I had a build issue that was preventing the latest version of my custom control assembly from being properly referenced.
     
    Thanks for your time & assistance-
    John
     
  •  10-26-2010, 7:47 AM 64699 in reply to 64680

    Re: Dropdown item highlighting is not consistent

    Great!
View as RSS news feed in XML