Problem with highlighting text and right click menu

2 posts, 0 answers
  1. NA
    NA avatar
    3 posts
    Member since:
    Dec 2007

    Posted 28 Mar 2008 Link to this post

    I am having trouble customizing/theming one particular area of this control, the color in which the input text is highlighted. It seems to default to whatever the OS is using, which completely clashes with the custom theme that can be loaded for this control. I think the same problem exists in the ComboBox and regular text box.

    Can someone point me to where this can be customized? If not customizeable, I would suggest adding it as its very incongruent with the theming ability.

    The same goes for the menu. The default right click menu on these controls seems to be the bevelled default menu style for whatever the OS is using (XP and it's theme, or what have you).
  2. Nikolay
    Nikolay avatar
    1802 posts

    Posted 01 Apr 2008 Link to this post

    Hi NA,

    The color of the selected text and the corresponding background area is governed by the Operating System and this behavior cannot be customized.

    As to the context menus, you can use RadDropDownMenu instead of the default ContextMenu. The right approach to do this is by code. In the targeted control's MouseDown event handler, you should create and show the context menu.

    Please refer to the snippet below:

    private void radButton1_MouseDown(object sender, MouseEventArgs e)  
        if (e.Button == MouseButtons.Right)  
            RadDropDownMenu contextMenu = new RadDropDownMenu();  
            RadMenuItem item = new RadMenuItem("First item");  
            item.Click += new EventHandler(firstItem_Click);  
            RadMenuItem item2 = new RadMenuItem("Second item");  
            item2.Click += new EventHandler(secondItem_Click);  

    I hope this helps. If you have additional questions, do not hesitate to contact me.

    Sincerely yours,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft banner
Back to Top