Discussion Thread
UniToolbox
Message Thread
The leading control suite for Unicode development in Visual Basic.
Posted in the UniToolbox Forum.
UniListView and SelectedItem
Hello,
In my project I widely use code like:
Set ListView.SelectedItem = Nothing
to unselect active item in current ListView.
After migrating to UniToolbox, I discovered that this code no longer works. The ListView keeps current item selected even after being assigned Nothing. Instead, to unselect active item, I must use .Selected = False.
So now I need to replace my existing code this with longer code:
If Not lvwMain.SelectedItem Is Nothing Then
lvwMain.SelectedItem.Selected = False
End If
Is this behaviour by default? I hoped that I wouldn't need to change any of my code after migration to UniListView.
UniListView and SelectedItem
You have made the correction correctly, it's only one line so hopefully that should not be too much work for you.
We have tried to emulate the MS controls as accurately as we can, however 100% emulation is probably impossible in all cases. We always recommend full testing of any converted project, and the conversion process should get you 99% of the way there.