Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ON KEY LABEL RIGHTMOUSE DO....
Message
From
03/10/2001 10:58:03
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
03/10/2001 10:47:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00563610
Message ID:
00563620
Views:
13
If you want to enable rightmouse for some action in one particular field, you can use the event RightMouse(). This is usually much safer than ON KEY LABEL.

If you want the same, say, for all spinners, then you should use inheritance (assign the event in your base class cSpinner).

HTH, Hilmar.

>Hello,
>
>I am just converting FPW codes to VFP6 but the command :
>
>ON KEY LABEL RIGHTMOUSE DO abc.PRG did not worked because it stops on the field I select the right mouse.
>
>Then I decide to change to ON KEY LABEL ENTER DO abc.PRG , it works with ENTER key instead of rightmouse click key.
>
>Any help would really appreciated
>PP
>
>the codes of ABC.prg as follows:
>
>procedure abc
>
>release code_name, field_name, loc_code
>public code_name, field_name, loc_code
>if rdlevel() = 0
> wait window "No fields chosen" timeout 5
> return
>endif
>
>push key clear
>
>cPopAlias=alias()
>
>do case
> case type("m.grm_type") # "U" .and. _curobj = objnum(m.grm_type)
> do popList with 4,"~TRU|~TCH|~MAJ|~DEP|","~Thru-Min|~Touch Up|~Major|~Deep|","m.grm_type"
> case type("m.ifs_access") # "U" .and. _curobj = objnum(m.ifs_access)
> do popList with 3,"~Y|~N|~-|","~Yes|~No|~ |","m.ifs_access"
> otherwise
> do DispErr with "No Popop available"
>
>endcase
>
>if ! empty(cPopAlias)
> select &cPopAlias
>endif
>pop key
>
>procedure assign_val
>parameters place_value,actual_value
>&place_value = actual_value
>deactivate popup code_select
>release popup code_select
>
>procedure PopList
> parameters nOptions,cOptions,cOptionExplanations,cFieldVar
> define popup code_select from 10,32 scroll title " Choices "
> dimension cCurOpt(nOptions),cCurOptExpl(nOptions)
> for nOptionCounter = 1 to nOptions
> cCurOpt(nOptionCounter) =subs(cOptions,at('~',cOptions,nOptionCounter)+1,at('|',cOptions,nOptionCounter)-(at('~',cOptions,nOptionCounter)+1))
> cCurOptExpl(nOptionCounter)=subs(cOptionExplanations,at('~',cOptionExplanations,nOptionCounter)+1,at('|',cOptionExplanations,nOptionCounter)-(at('~',cOptionExplanations,nOptionCounter)+1))
> define bar nOptionCounter of code_select prompt cCurOpt(nOptionCounter)+" - "+cCurOptExpl(nOptionCounter)
> c='on selection bar '+allt(str(nOptionCounter))+' of code_select do assign_value with cFieldVar,"'+cCurOpt(nOptionCounter)+'"'
> &c
> next
> activate popup code_select
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform