|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
listview itemcheck event problema smart device app from VS2003 VB.NET CF1.0 to VS2005 VB.NET CF2.0. I'm using the listview item checkbox to indicate if the item is "processed". When the item becomes processed, i set the listviewitem.checked property to true. To prevent the user from changing the state of the box manually, i use the itemcheck event and set: e.NewValue = e.CurrentValue This worked fine in VS2003, but now, when i set the checked property to true, the itemcheck event is being kicked off and sets it back to false (unchecked). Can anyone help! Ian. Turn off the event handler before you set the check state and then turn it
on again when you're done. Something like this: RemoveHandler myListView.ItemCheck, AddressOf myListView_ItemCheck myListViewItem.Checked = True AddHandler myListView.ItemCheck, AddressOf myListView_ItemCheck /claes <ian.watk***@vscsolutions.com> wrote in message Show quoteHide quote news:1155132298.887931.126170@b28g2000cwb.googlegroups.com... > I'm having a problem with the listview itemcheck event since upgrading > a smart device app from VS2003 VB.NET CF1.0 to VS2005 VB.NET CF2.0. > > I'm using the listview item checkbox to indicate if the item is > "processed". When the item becomes processed, i set the > listviewitem.checked property to true. > > To prevent the user from changing the state of the box manually, i use > the itemcheck event and set: > > e.NewValue = e.CurrentValue > > > This worked fine in VS2003, but now, when i set the checked property to > true, the itemcheck event is being kicked off and sets it back to false > (unchecked). > > Can anyone help! > Ian. > Thanks Claes.
That worked. Ian. Claes Bergefall wrote: Show quoteHide quote > Turn off the event handler before you set the check state and then turn it > on again when you're done. Something like this: > > RemoveHandler myListView.ItemCheck, AddressOf myListView_ItemCheck > myListViewItem.Checked = True > AddHandler myListView.ItemCheck, AddressOf myListView_ItemCheck > > /claes > > <ian.watk***@vscsolutions.com> wrote in message > news:1155132298.887931.126170@b28g2000cwb.googlegroups.com... > > I'm having a problem with the listview itemcheck event since upgrading > > a smart device app from VS2003 VB.NET CF1.0 to VS2005 VB.NET CF2.0. > > > > I'm using the listview item checkbox to indicate if the item is > > "processed". When the item becomes processed, i set the > > listviewitem.checked property to true. > > > > To prevent the user from changing the state of the box manually, i use > > the itemcheck event and set: > > > > e.NewValue = e.CurrentValue > > > > > > This worked fine in VS2003, but now, when i set the checked property to > > true, the itemcheck event is being kicked off and sets it back to false > > (unchecked). > > > > Can anyone help! > > Ian. > >
Referencing Controls created at run time.
FileListBox from VB6? MS VB Newbie Tutorial Check to see if a server is running Check if a Windows service running Dataset End all running code of .dll Class item not accessible because it's private... but it's not? Writing to a file opened in another class Multi-level TreeNode storing? |
|||||||||||||||||||||||