ListView - selecting first item in list causes rename
I have an application with several Listview controls on it, in report view containing a few columns of data.
The application requires selecting some items in the ListView and adding them to another Listview.
My problem is that when the first item in the ListView is selected (only for the first item) It tries to let you rename the item, rather than merely selecting it.
Does anyone know if there is a way to stop this from happening?????
Re: ListView - selecting first item in list causes rename
In design mode: right click on your ListView -> Properties -> General tab -> LabelEdit field should be set to Manual.
Re: ListView - selecting first item in list causes rename
Thanks - it worked perfectly. Brilliant!!!
Re: ListView - selecting first item in list causes rename
If you do it from code:
====
Private Sub ListView_BeforeLabelEdit(Cancel As Integer)
Cancel = True
End Sub
====
Regards,
Michi
Re: ListView - selecting first item in list causes rename
In design mode, right-click on the ListView, select Properties...
Change the LabelEdit property from 0-lvwAutomatic to 1-lvwManual.
Note, you may also want to click the checkbox to the right to set FullRowSelect.