Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DEFINE BAR Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01044001
Message ID:
01044126
Vues:
14
>I have:
>
>
>DEFINE BAR 2 OF padFile PROMPT "\<Open..." KEY "CTRL+O"
>
>
>I then want to clear out the KEY clause, so I reissue
>
>
>DEFINE BAR 2 OF padFile PROMPT "\<Open..."
>
>
>Yet the hotkey stays on the menu. I can change to some other
>string, but I cannot get rid of it.
>
>Anyone know whats up here?
>
>Thanks

Not, KEY clause don't allow a empty parameters
* If POPUP is absolute then is simple
RELEASE BAR 2 OF padFile 
DEFINE BAR 2 OF padFile PROMPT "\<Open..." 
* if popup is relative, redefine the bar in the same position it is not simple
* without information, because AFTER/BEFORE they ask for an existing bar,
* and AFAIK don't exist a command that return the current BAR position
* then
* put this into a procedure
FOR ipos=1 TO CNTBAR("padFile")
   IF GETBAR("padFile",m.ipos)=2
        release BAR 2 OF padFile 
	EXIT
   ENDIF
NEXT
IF m.ipos=1
    DEFINE BAR 2 OF padFile PROMPT "\<Open..."  BEFORE _MFIRST
ELSE
    DEFINE BAR 2 OF padFile PROMPT "\<Open..."  AFTER GETBAR("padFile",m.ipos-1)
ENDIF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform