strange border appears when inherit from raddropdownlist

3 posts, 0 answers
  1. Frank Beerens
    Frank Beerens avatar
    26 posts
    Member since:
    Jan 2010

    Posted 19 Jul 2013 Link to this post

    Hello,

    I created a new combobox class and used the RadDropDownList as base class, but when I override the CreateDropDownListElement function and return my own element, a black border appears:

    public class TestComboBox : RadDropDownList
        {
            public override string ThemeClassName
            {
                get
                {
                    return typeof(RadDropDownList).FullName;
                }
                set
                {
                    base.ThemeClassName = value;
                }
            }
     
            protected override RadDropDownListElement CreateDropDownListElement()
            {
                //return base.CreateDropDownListElement();
                return new TestElement(this);
            }
        }
     
        public class TestElement : RadDropDownListElement
        {
            public TestElement()
            {
                //
            }
     
            public TestElement(object owner)
                : base(owner)
            {
                //
            }
     
        }

  2. Frank Beerens
    Frank Beerens avatar
    26 posts
    Member since:
    Jan 2010

    Posted 19 Jul 2013 Link to this post

    Never mind... I have the solution: inherit from RadDropDownListEditorElement
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 24 Jul 2013 Link to this post

    Hi Frank,

    I am glad you have found a solution for your case. For more information about it take a look at the following article.
     

    Regards,
    Stefan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top