Discussion Thread


Message Thread

Developer ComponentFor WindowsUniToolbox

UniToolbox iconThe leading control suite for Unicode development in Visual Basic.

Posted in the UniToolbox Forum.

UniListView and SelectedItem


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.
by Wapper on Apr 5 2009 2:25pm Reply

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.
by Nico Westerdale on Apr 5 2009 5:10pm Reply

Our Software Stores

IconicoAccurate Design and Development Software

BitsDuJourDiscount Deal Coupons for Windows and Mac Software Apps

Our Software Services

IcoBlogOur Official Blog

© copyright 2004-2021 Iconico, Inc. Code & Design. All Rights Reserved. Terms & Conditions Privacy Policy Terms of Use Login