If i have a listview inside of a sizable form and change the size of the form, how do i get the listview to change size accordingly ?
Printable View
If i have a listview inside of a sizable form and change the size of the form, how do i get the listview to change size accordingly ?
you can play around with thatCode:private sub form_resize()
'list1 and form1 being name
list1.width = form1.width - 400
list1.height = form1.height - 500
end sub
When ever a form is resized, the Form_Resize event fires. Place code to resize the Listview in that event.
The following example will keep the Listview control the size of the Form.
VB Code:
Private Sub Form_Resize() 'don't resize anything if the form is minimized If Me.WindowState <> vbMinimized Then Me.ListView1.Move 0,0,ScaleWidth,ScaleHeight End If End Sub