I have my own ListView class, inheriting from Forms.ListView. When double clicking on the line between the columns, the columns resize to show the column items in full size.
HOWEVER, for me this doesnt work properly – some words are partially hidden.
My theory is that this is due to the items having different fonts and that the ListView doesnt look at them all, causing some larger font items to still be partially hidden.
Anyone got a solution to this problem (I cant seem find any event for when double clicking between columns)? And is my theory plausible?
best regards
I think you could try with this code, I wrote it now, tested and it worked for me. Note that on my computer
ColumnwidthChangingevent is firing on each pixel changed (when you resize column using mouse) and on double click it changes for more than two pixels.Iam passing Font that is set for the list. You should do it with the font for particular ListViewItem. Try it out and if it works for you than that’s it.EDIT:These are the settings for my
ListViewin Form1.Designer.cs, I think this can help you: