General information
Category:
Coding, syntax & commands
Title:
ON KEY LABEL RIGHTMOUSE DO....
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only