C# ListView Column Width Auto

后端 未结 10 1105
傲寒
傲寒 2020-11-28 07:04

How can I set the column width of a c# winforms listview control to auto. Something like width = -1 / -2 ?

10条回答
  •  攒了一身酷
    2020-11-28 07:44

    I believe the author was looking for an equivalent method via the IDE that would generate the code behind and make sure all parameters were in place, etc. Found this from MS:

    Creating Event Handlers on the Windows Forms Designer

    Coming from a VB background myself, this is what I was looking for, here is the brief version for the click adverse:

    1. Click the form or control that you want to create an event handler for.
    2. In the Properties window, click the Events button
    3. In the list of available events, click the event that you want to create an event handler for.
    4. In the box to the right of the event name, type the name of the handler and press ENTER

提交回复
热议问题