radDropDownList Border Color

7 posts, 1 answers
  1. Sr
    Sr avatar
    5 posts
    Member since:
    Jul 2012

    Posted 10 Jul 2012 Link to this post

    Hi,

    I am unable to highlight the full dropdown list (including the text box and button) 

    The attached file will show how it is currently highlight but would like to highlight in the same way(color and thickness) as the textbox in the attached file. I used the below code but it did not highlight the button.

    Thanks in advance for your help.



    radDDL.DropDownListElement.TextBox.Fill.BackColor = Color.Red;
  2. Answer
    Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 13 Jul 2012 Link to this post

    Hello,

    Thank you for writing.

    You can change the border color of the whole drop down list by using the following code line:
    ((BorderPrimitive)radDDL.DropDownListElement.Children[2]).ForeColor = Color.Red;

    Feel free to write back with any further questions.

    Kind regards,
    Ivan Petrov
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Sr
    Sr avatar
    5 posts
    Member since:
    Jul 2012

    Posted 13 Jul 2012 Link to this post

    It worked well. Thank you Ivan
  5. Denis Cilliers
    Denis Cilliers avatar
    62 posts
    Member since:
    Jan 2004

    Posted 17 Sep 2012 Link to this post

    In VB.Net pls how would you do this?
  6. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 17 Sep 2012 Link to this post

    Here you are Denis: 
    DirectCast(radDDL.DropDownListElement.Children(2), BorderPrimitive).ForeColor = Color.Red

    You can also use our free online converter at the following link: http://converter.telerik.com/ .
     
    Regards,
    Stefan
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
  7. MG
    MG avatar
    6 posts
    Member since:
    May 2013

    Posted 14 Nov 2013 Link to this post

    Hi,

    I think it has to be 
    ((BorderPrimitive)radDDL.DropDownListElement.Children[0]).ForeColor = Color.Red;

    rather than

    ((BorderPrimitive)radDDL.DropDownListElement.Children[2]).ForeColor = Color.Red;

    I am using version: 2013.3.1016.40

    Thx,
    MG
  8. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 19 Nov 2013 Link to this post

    Hello MG,

    Thank you for writing.

    I can confirm that the BorderPrimitive is the first child in the collection in our latest version. The change was introduced back in Q3 2012 as stated in our Release Notes.

    I hope this helps.

    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
UI for WinForms is Visual Studio 2017 Ready