Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ShortCut Menus and object references
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00190379
Message ID:
00191028
Views:
41
>Couls something like this work?
>
>on selection ... _screen.ActiveForm.CmdButton.Click() ?
>
>Silvio
>
>>I would like to call an objects click method or a forms deleterecord method from a shortcut menu created when the user presses the rightmouse button. I have a method that has the following code:
>>
>>IF VARTYPE(oReplaceButton) = 'U'
>> * The variable did not exists so let create it
>> PUBLIC oReplaceButton
>>ENDIF
>>IF VARTYPE(oThisForm) = 'U'
>> * The variable did not exists so let create it
>> PUBLIC oThisForm
>>ENDIF
>>
>>oReplaceButton = THISFORM.C40pgListDocuments.Page2.C40pklstReplaceListDoc
>>oThisForm = THISFORM
>>
>>define bar 1 of SHORTCUT prompt 'Delete this list document from the ADL '
>>define bar 2 of SHORTCUT prompt 'Replace this list document with another '
>>on selection bar 1 of SHORTCUT oThisForm.DeleteRecord()
>>on selection bar 2 of SHORTCUT oReplaceButton.Click()
>>lnBars = 2
>>
>>As you noticed I have to declare PUBLIC variables to accomplish the task. What I was wondering is this the best way of accomplishing this or is there another way that is better. I just suspect that PUBLIC variables may not be the correct solution.
>>
>>TIA

I will test that out, it seems logical. I dont know what the draw back would be, but if anyone out there knows maybe they will respond.

Thanks
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Reply
Map
View

Click here to load this message in the networking platform