Dropdownlist height

2 posts, 1 answers
  1. steve gray
    steve gray avatar
    17 posts
    Member since:
    Mar 2006

    Posted 18 Apr 2012 Link to this post

    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>

  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 19 Apr 2012 Link to this post

    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
Back to Top