开发者

To maximize the size of listview in c#

开发者 https://www.devze.com 2022-12-19 16:59 出处:网络
I have a listview .On clicking a button i want to开发者_如何学Python maximize the size of listview.Can anybody help to get a way to maximize the listview?In addition to set explicitly the width and he

I have a listview .On clicking a button i want to开发者_如何学Python maximize the size of listview.Can anybody help to get a way to maximize the listview?


In addition to set explicitly the width and height you can use DockStyle.Fill mode to automatically stretch the all window area.

listview1.Dock = System.Windows.Forms.DockStyle.Fill;


Edit: if you want the listview to be full screen, you need to container window to be full screen.

To do that you can use:

this.WindowState = FormWindowState.Maximized;
this.FormBorderStyle = FormBorderStyle.None;
this.TopMost = true;

Where this referred to the form.


You can set the height and width of the list box the same as you can for any other windows control.

0

精彩评论

暂无评论...
验证码 换一张
取 消