ListControl doesn't expand to fit items

3 posts, 1 answers
  1. Elliott
    Elliott avatar
    391 posts
    Member since:
    May 2010

    Posted 23 Aug 2012 Link to this post

    I am replacing a bunch of ListBox controls with ListControl
    the ListBox controls start out with the height of one item, then expand to fit more items if need be
    Telerik ListControl doesn't do this
    please tell me the properties I need to do this, or do I manually have to adjust the height?
    I tried setting AutoSize and AutoSizeItems to true but that did squatz (translation: nothing)
  2. Answer
    Peter
    Admin
    Peter avatar
    1148 posts

    Posted 28 Aug 2012 Link to this post

    Hi Marianne,

    Thank you for contacting Telerik support.

    RadListControl for winforms does not support such a feature and you should manually adjust the control height.
    For example:
    int totalHeight = 12 /*items count*/ * 24 /*item height*/;
    this.radListControl1.Size = new Size(this.radListControl1.Size.Width, totalHeight);
     
    I hope this helps.

    Regards,
    Peter
    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. Elliott
    Elliott avatar
    391 posts
    Member since:
    May 2010

    Posted 28 Aug 2012 Link to this post

    good to know
    and thankis for the kode
Back to Top