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=t rue in the listview
Private Sub ListView1_ItemS electionChanged (ByVal sender As Object, _
ByVal e As System.Windows. Forms.ListViewI temSelectionCha ngedEventArgs) _
Handles ListView1.ItemS electionChanged
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=t rue in the listview
Private Sub ListView1_ItemS electionChanged (ByVal sender As Object, _
ByVal e As System.Windows. Forms.ListViewI temSelectionCha ngedEventArgs) _
Handles ListView1.ItemS electionChanged
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.
Comment