none
Dynamically set the size of ListView RRS feed

  • Question

  • I m stuck with a problem That i m creating a control ListView dynamically at run time
    So I want to set the LocationX , LocationY , Height & Width of this COntrol
    Now I set the Location X & Y according to place where it is to be shown
    But the Problem is How to know the
    optimal height & Width of the ListView COntrol
    So that i can set the Height & width

    Or Shall i Hardcode it That is the only way.
    But i want to set the size of teh contro dynamically according to the contents
    Becoz if Hardcode that Then ListView
    looks odd if It has only 2 rows
    or if Its having 200 or 100 or 500 rows


    So plz Guide me How to achieve the solution for this

    Thanks a lot in advance
    Thanks for this Kind Help

    Friday, March 17, 2006 8:58 AM