This is a migrated thread and some comments may be shown as answers.

RadDropDownList with VisualStudio2012Light theme issues

3 Answers 75 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Phil
Top achievements
Rank 1
Phil asked on 14 Jan 2016, 12:08 AM

I'm having issues with the theming of the RadDropDownList using the VisualStudio2012Light theme. I've set my RDDL to have a height of 20px and without theming the text vertically centers normally and there are no hassles whatsoever. As soon as I apply the theme then things start getting pear shaped.

The RDDL automatically adjusts its height to 24px which is not what I want. This mismatches all the other controls I have with the same theme - none of them resize when the theme is applied.

When I adjust the height of the RDDL to 20px after the theming has been applied the height adjusts fine but the text remains in the same position and gets cut off. The offset doesn't adjust.

I know in the past themes have been buggy at times but this is the first time I've come across this particular issue. I can say for certain that with 2013.2.724.40 this wasn't an issue but after checking some other versions it was also a problem in 2015 Q2.

I'm using VS2012, .NET 4.0. The attached image shows:

1. How the text is cut off

2. How the RDDL resized itself

3. How the RDDL compares to a RadTextBox and a RadDateTimePicker

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 18 Jan 2016, 09:26 AM
Hello Phil,

Thank you for writing.

In order to limit RadDropDownList's height, you should set its MaximumSize property. Additionally, it is necessary to resize the nested TextBox inside:
public Form1()
{
    InitializeComponent();
 
    ThemeResolutionService.ApplicationThemeName = "VisualStudio2012Light";
 
    this.radDropDownList1.MaximumSize = new Size(200, 20);
    this.radDropDownList1.DropDownListElement.TextBox.TextBoxItem.MinSize = new Size(0, 19);
    this.radDropDownList1.DropDownListElement.TextBox.TextBoxItem.TextBoxControl.MinimumSize = new Size(0, 18); 
}

I hope this information helps. Should you have further questions I would be glad to help.
 
Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Phil
Top achievements
Rank 1
answered on 19 Jan 2016, 12:45 AM

Dess, thanks for the guidance. In order to get the text to match up with default styling the end result was:

 

public Form1()
{
    InitializeComponent();
  
    ThemeResolutionService.ApplicationThemeName = "VisualStudio2012Light";
  
    this.radDropDownList1.MaximumSize = new Size(200, 20);
    this.radDropDownList1.DropDownListElement.TextBox.TextBoxItem.Location = new System.Drawing.Point(this.radDropDownList1.DropDownListElement.TextBox.TextBoxItem.Location.X, this.radDropDownList1.DropDownListElement.TextBox.TextBoxItem.Location.Y + 1);
    this.radDropDownList1.DropDownListElement.TextBox.TextBoxItem.MinSize = new System.Drawing.Size(0, paHeight - 3);
  this.radDropDownList1.DropDownListElement.TextBox.TextBoxItem.TextBoxControl.MinimumSize = new System.Drawing.Size(0, paHeight - 4);
}

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 19 Jan 2016, 12:36 PM
Hello Phil,

Thank you for writing back. 

I am glad that the suggested approach helped you to achieve the desired look. If you have any additional questions, please let me know.

Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Themes and Visual Style Builder
Asked by
Phil
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Phil
Top achievements
Rank 1
Share this question
or