ListView column auto sizing

前端 未结 8 1964
执念已碎
执念已碎 2020-12-18 23:28

Let\'s say I have the following ListView:


  
    
            


        
8条回答
  •  半阙折子戏
    2020-12-19 00:04

    First set the name in the column header like so:

    
    

    And then on resize modify width.

    Private Sub winMain_SizeChanged(sender As Object, e As SizeChangedEventArgs) Handles Me.SizeChanged
    
    
        If Me.IsLoaded = False Then Exit Sub
    
        lvhDescription.Width = e.NewSize.Width - 665
    
    
    End Sub
    

提交回复
热议问题