Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DEFINE BAR Problem
Message
From
25/08/2005 18:12:15
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01044001
Message ID:
01044126
Views:
15
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform