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.
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;
8 Answers, 1 is accepted
0
Accepted
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;
((BorderPrimitive)radDDL.DropDownListElement.Children[0]).ForeColor = Color.Red;
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 >>
0
Sr
Top achievements
Rank 1
answered on 13 Jul 2012, 04:23 PM
It worked well. Thank you Ivan
0
Denis Cilliers
Top achievements
Rank 1
answered on 17 Sep 2012, 10:40 AM
In VB.Net pls how would you do this?
0
Here you are Denis:
CType(radDDL.DropDownListElement.Children(2), BorderPrimitive).ForeColor = Color.Red
Edit: With Q3 2012 the hierarchy of DropDownListElement children has changed and the child index of the BorderPrimitive is 0:
CType(radDDL.DropDownListElement.Children(0), BorderPrimitive).ForeColor = Color.Red
You can also use our free online converter at the following link: https://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 >>
0
MG
Top achievements
Rank 1
answered on 14 Nov 2013, 10:30 AM
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
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
0
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
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 >>
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 >>
0
Ian
Top achievements
Rank 2
Bronze
Iron
Iron
answered on 15 Jan 2019, 11:33 AM
In vb.net, I could only make this work with:
Dim bp As BorderPrimitive = TryCast(RadDropDownList1.DropDownListElement.Children.Item(0), BorderPrimitive)
bp.ForeColor = Color.Red
- I found the border at position zero in the children collection.
Is the above answer out-of-date, or am I doing something different ?
0
Hi Ian,
I have tested this and it works on my side. Are you using a specific theme in this case? Please make sure that the color is not set at another place in the code.
I hope this will be useful. Let me know if you have additional questions.
Regards,
Dimitar
Progress Telerik
I have tested this and it works on my side. Are you using a specific theme in this case? Please make sure that the color is not set at another place in the code.
I hope this will be useful. Let me know if you have additional questions.
Regards,
Dimitar
Progress Telerik
Get quickly and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.