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

Dropdownlist height

1 Answer 409 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Steve Gray
Top achievements
Rank 1
Steve Gray asked on 18 Apr 2012, 08:02 PM
Sirs:
I have a WinForm onto which I'm dropping quite a few text boxes and one radDropDownList. All the text boxes (not Telerik) are 20 px tall, and the DropDownList is 18 px tall. I have to use the default theme.

Is there a simple way to set the height of the control? (Not the dropped down height, the height when closed)
You'd think that CONTROLNAME.HEIGHT = 20 would work, but it doesn't

I tried increasing the font size, that worked but looked dumb. <smiles>


1 Answer, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 19 Apr 2012, 03:36 PM
Hi Steve, 

Try this as an example. 

this.radDropDownList1.Items.Add("Item 1");
this.radDropDownList1.Items.Add("Item 2");
this.radDropDownList1.Items.Add("Item 3");
this.radDropDownList1.Items.Add("Item 4");
 
this.radDropDownList1.SelectedItem = this.radDropDownList1.Items[0];
this.radDropDownList1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
 
this.radDropDownList1.DropDownListElement.AutoSize = false;
this.radDropDownList1.DropDownListElement.Size = new Size(this.radDropDownList1.Width, 40);


Hope this helps
Richard
Tags
DropDownList
Asked by
Steve Gray
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Share this question
or