Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checkboxes and listviews
Message
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01075320
Message ID:
01075708
Views:
25
Pete,
I am glad to hear you solved you problem.
I just can't figure out why you need the isDoubleClick member and the mousedown event.
Are you using a CheckedListBox or a ListView with CheckBoxes set to true?

Just in case I set up a simple test form with both options and I did not need the mousedown event. I might be misunderstanding what you need to do.

If you are using the ListView with checkboxes I would reccomend looking into the CheckedListBox control as (IMO) it look prettier :)

Einar

>Hello Einar, thanks for your reply - your code partially works ( the checkbox becomes checked and then unchecked ) with the extra code in the mousedown and the isDoubleClick member , it works perfectly, thanks for pointing me in the right direction
>
>
>
>private void lv_MouseDown(object sender,System.Windows.Forms.MouseEventArgs e)
>{
>    this.isDoubleClick = (e.Button == MouseButtons.Left && e.Clicks >= 2);
>}
>
>private void lv_ItemCheck(object sender,System.Windows.Forms.ItemCheckEventArgs e)
>{
>    if (this.isDoubleClick)
>    {
>        e.NewValue = e.CurrentValue;
>        this.isDoubleClick = false;
>    }
>}
>
>
>
Semper ubi sub ubi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform