>This depends entirely on where your rowsource comes from - ie - the RowSourceType. Even assuming your RowSourceType is simply 'Value', your second last line doesn't refer to the item being changed. Again, assuming a RowSource Type of 'Value', try this in the RightClick():
>
>
>LOCAL llOk, lnCount
>llOk = .F.
>
>* find out if anything is actually selected
>FOR lnCount = 1 TO This.ListCount
> IF This.Selected(lnCount)
> llOk = .T.
> lnSelected = lnCount
> lnCount = This.ListCount
> ENDIF
>ENDFOR
>
>IF llOk
> lcNewName = INPUTBOX("New Name:")
> IF !EMPTY(lcNewName)
> This.List(lnSelected) = lcNewName
> ENDIF
>ENDIF
>This.Refresh()
>
>
You don't need the first loop, I believe SelectedID is the property. However, in my Help Selected and SelectedID have the same description. Are they really the same or it's a bad Help (July 1999 MSDN)?
I re-read these descriptions again and now I'm confused. What's the difference between nIndex and nItemID and between Selected and SelectedID. Seems like there is no property, which would return selected ID...
If it's not broken, fix it until it is.
My Blog