C# ListView Tile Width 100%?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 19:41:53

There is no direct way to detect that the scrollbar became visible. An indirect way though, write an event handler for the ClientSizeChanged event:

    private void listView1_ClientSizeChanged(object sender, EventArgs e) {
        listView1.TileSize = new Size(listView1.ClientSize.Width, listView1.TileSize.Height);
    }

Also change the DPI setting on your machine to verify that your tile size is still appropriate. That normally changes the size of the controls. ClientSize.Width is your friend.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!