Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Right Click Menus
Message
De
12/03/1998 21:01:27
 
 
À
12/03/1998 20:22:49
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00075532
Message ID:
00084331
Vues:
33
Well, I find the example in VFP Help ON BAR!!

it use POPUP() to find which PopupMenu and
LOWER(PROMPT()) to find which Bar is selected!!

Although hard to maintain as you need to update the procedure
if you need to change the bar prompt,
it should work anyway!!

Sometimes, although using OOP concept but still
need to remember what possible side effect when there
is a dependent relation between screen objects.
~~'.'~~

But at least more easy to maintain then BAR ()
because if you need to insert some bars in middle!!

Surely Menu is not OOP as the VFP Help has stated it!!

Sorry for recall VB again, for all VB textbox, no need to add popup but
already use window system textbox popup... :(

lastly, If I want to popup like a normal window popup,
means that the popup is 'Raised' with Grey in COlor!
As I have try a lot on color scheme value 0-4 but none of it like
Window RIghtmouse Popup.... x_X'



>I tried the suggestion you gave Sarah with the code shown below (which I put in my class's new ShortCutMenu method). The problem I'm having is silly, I'm sure, but BAR() is only every returning 0. Can you tell what I'm doing wrong? TIA
>
>*
>* Begin actual code
>*
>DEFINE POPUP ShortCutMenu SHORTCUT RELATIVE FROM MROW(), MCOL()
>DEFINE BAR 1 OF ShortCutMenu PROMPT "CueCard"
>DEFINE BAR 2 OF ShortCutMenu PROMPT "\-"
>DEFINE BAR 3 OF ShortCutMenu PROMPT "Undo"
>
>ACTIVATE POPUP shortcutMenu
>
>LOCAL lnBar
>lnBar = BAR()
>
>*
>* End Code (snipped)
>*
>
>>Yes I have an idea. Let's use a textbox as an example, although you could do this with any control.
>>
>>Create a textbox class, let's name it txtRightClick. Give this class a custom method named ShortCutMenu. IN the RightClcik event of the class put this line of code;
>>
>>THIS.ShortCutMenu()
>>
>>In the shortcutmenu method put code similar to this;
>>
>> DEFINE POPUP ShrtMenu SHORTCUT RELATIVE
>> DEFINE BAR 1 OF ShrtMenu PROMPT "Undo" KEY Ctrl+Z
>> ACTIVATE POPUP ShrtMenu
>>
>> LOCAL lnBar
>> lnBar = BAR()
>>
>> DO CASE
>> CASE lnBar = 1
>> * Undo chosen
>> * You have THIS as a reference to the textbox so do your thing
>>
>> ENDCASE
>> RELEASE POPUP ShrtMenu
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform