Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checkboxes and listviews
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
01075320
Message ID:
01075708
Vues:
24
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform