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

ListControl doesn't expand to fit items

2 Answers 72 Views
ListControl
This is a migrated thread and some comments may be shown as answers.
Elliott
Top achievements
Rank 2
Elliott asked on 23 Aug 2012, 03:06 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 28 Aug 2012, 09:33 AM
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 >>
0
Elliott
Top achievements
Rank 2
answered on 28 Aug 2012, 01:05 PM
good to know
and thankis for the kode
Tags
ListControl
Asked by
Elliott
Top achievements
Rank 2
Answers by
Peter
Telerik team
Elliott
Top achievements
Rank 2
Share this question
or