Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Activate popup on right click in a grid
Message
De
04/08/1998 11:13:33
 
 
À
04/08/1998 11:11:15
Francois Liboiron
National Bank of Canada
Montréal, Québec, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00123022
Message ID:
00123804
Vues:
21
Currently, I don't use vfp3b. I just went back to an old project to give you some help.

>I will try what you suggest, thank you and good luck with vfp3b...
>>'Changenameid' is some custom form's method which makes some action based on popup selection. I just copied this code from one my project.
>>
>>>I understand what you make in the init event of the form
>>>and after in the grid.column.textbox, but could you explain what
>>>this line do :
>>>on selection popup popNames1 frsMain.frmNames.changenameid()
>>>I mean this part : frsMain.frmNames.changenameid()
>>>
>>>>It works in 3b in slightly different way:
>>>>*** Form.Init event
>>>>*** prepare right-click menu
>>>>define popup popNames1 margin color scheme 4
>>>>define bar 1 of popNames1 prompt 'Artist'
>>>>define bar 2 of popNames1 prompt 'Creator'
>>>>define bar 3 of popNames1 prompt 'Publisher'
>>>>define bar 4 of popNames1 prompt 'Unknown'
>>>>on selection popup popNames1 frsMain.frmNames.changenameid()
>>>>*** grid.column.textbox.rightclick
>>>>activate popup popNames1 at mrow(),mcol()
>>>>
>>>>
>>>>>Your are all right with your suggestions but, if found that with vfp 3.0b
>>>>>this command is not available :
>>>>>DEFINE POPUP mypopup SHORTCUT RELATIVE FROM MROW(),MCOL()
>>>>>SHORTCUT is not available with vfp 3.0b. I choose to make a form with
>>>>>the options i want instead of using the right click with a popup menu.
>>>>>I am waiting my boss to upgrade to the version 6.0. We got windows 3.1
>>>>>on 22 machines and they stop the progress still 2 years!!!
>>>>>
>>>>>>>Thank you, but the line
>>>>>>>ON SELECTION POPUP myPopup DO myprg WITH BAR()
>>>>>>>
>>>>>>>BAR( ) returns 0 if there is no active menu or if the user presses Esc to exit the menu. I dont want to change de sysmenu, is it possible
>>>>>>>to have just the popup? and take a action with the value of BAR().
>>>>>>>
>>>>>>
>>>>>>Instead of calling a procedure, do conditional statements below activate popup directly.
>>>>>>
>>>>>>
>>>>>>ON SELECTION POPUP mypopup
>>>>>>ACTIVATE POPUP mypopup
>>>>>>
>>>>>>DO CASE
>>>>>>CASE BAR() = 0
>>>>>>     blah...
>>>>>>CASE BAR() = 1
>>>>>>     blan...
>>>>>>ENDCASE
>>>>>>
>>>>>>RELEASE POPUP mypopup
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>Hi,
>>>>>>>> Use Shortcut instead of popup and call it from RIGHTCLICK() event of the grid's textbox. For Example
>>>>>>>>
>>>>>>>> DEFINE POPUP mypopup SHORTCUT RELATIVE FROM MROW(),MCOL()
>>>>>>>>
>>>>>>>> DEFINE BAR 1 OF myPopup PROMPT "One"
>>>>>>>> DEFINE BAR 2 OF myPopup PROMPT "Two"
>>>>>>>>
>>>>>>>> ON SELECTION POPUP myPopup DO myprg WITH BAR()
>>>>>>>> ACTIVATE POPUP mypopup
>>>>>>>> RELEASE POPUP myPopup
>>>>>>>>
>>>>>>>>Hope it helps
>>>>>>>>
>>>>>>>>Bye
>>>>>>>>Jayesh
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform