I have a simple form with 2 ListViews. When I run the program it opens in default size for form and also for two listviews:
http://img838.imageshack.us/img838/6123/form1default.png
What I need to do is when the form gets expanded (only in WIDTH, I want the height be fixed) the second (wider) listview also be increased in width:
http://img269.imageshack.us/img269/4879/form1widthincrease.png
Can you pleae tell me what properties of form itself and/or second listview I have to change to achive this? Maybe some Events should be considered to add also?
Thanks!
You can achieve this by setting the
Anchorproperty of the secondListViewto includeAnchorStyles.Right, e.g.Top, Left, Rightin the properties window in Visual Studio.You might also want to include
AnchorStyles.Bottom, to resize theListView(s) when the height of the form changes.