Prevent Listview Column From Being Resized In Windows Forms C#
I added the snippet below in the columnwidthchanging event:
Where 400, 200, and 100 are the original column sizes.
switch (e.ColumnIndex) { case 0: e.NewWidth = 400; break; case 1: e.NewWidth = 200; break; case 2: e.NewWidth = 100; break; case 3: e.NewWidth = 100; break; default: break; } e.Cancel = true;
Comments
Post a Comment