M
Martin Horn
Hi all,
I want to implement a listview with editable subitems and I assume the
easiest way is to overlay a textbox over the item to be edited.
With this in mind I have come up with:
Using fullrowselect=true in the listview
Private Sub ListView1_ItemSelectionChanged(ByVal sender As Object, _
ByVal e As System.Windows.Forms.ListViewItemSelectionChangedEventArgs) _
Handles ListView1.ItemSelectionChanged
Dim t As New TextBox
Me.Controls.Add(t)
t.Location = e.Item.Position
t.BringToFront()
End Sub
Unfortunately item.position only enables me to get the position of the first
column. How can I obtain the x position of the subitem that was clicked.
I have searched google, but the only examples I can find are in C++ which I
can't make any sense of.
Thanks,
Martin.
I want to implement a listview with editable subitems and I assume the
easiest way is to overlay a textbox over the item to be edited.
With this in mind I have come up with:
Using fullrowselect=true in the listview
Private Sub ListView1_ItemSelectionChanged(ByVal sender As Object, _
ByVal e As System.Windows.Forms.ListViewItemSelectionChangedEventArgs) _
Handles ListView1.ItemSelectionChanged
Dim t As New TextBox
Me.Controls.Add(t)
t.Location = e.Item.Position
t.BringToFront()
End Sub
Unfortunately item.position only enables me to get the position of the first
column. How can I obtain the x position of the subitem that was clicked.
I have searched google, but the only examples I can find are in C++ which I
can't make any sense of.
Thanks,
Martin.