Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I detect the user has selected in a multiselect List
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00510516
Message ID:
00511647
Vues:
22
>>George,
>>
>>I guess you can put the code for enabling/disabling the button in the lostfocus event of the list, counting how many items were selected.
>>
>>Hugo
>
>Hugo -
>
>The users want to see the button become enabled/disabled before they leave the list (as they select/unselect items in the list).
>
>- George

You might try this:
Set up a string container property like:
lcCurrentlySelected="" && Null

In the click event of the list box, loop through
lnNumberSelected=0
for c=1 to this.listcount
if this.selectedid(c)
  lnNumberSelected=lnNumberSelected+1
  if lnNumberSelected>1 && At Least 2 selected
    exit && for
  endif
endif
endfor
thisform.MyCommand.Enabled= lnNumberSelected>1
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform