Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I detect the user has selected in a multiselect List
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00510516
Message ID:
00511647
Views:
21
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform