DOCUMENT:Q156875 14-DEC-1999 [foxpro] TITLE :PRB: Empty Bars Appear in Shortcut Menu PRODUCT :Microsoft FoxPro PROD/VER:WINDOWS:5.0,6.0 OPER/SYS: KEYWORDS:kbvfp500 kbvfp600 ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual FoxPro for Windows, versions 5.0, 6.0 ------------------------------------------------------------------------------- SYMPTOMS ======== Empty bars appear within a shortcut menu after creating the menu with the DEFINE POPUP command. CAUSE ===== The DEFINE POPUP command did not include the RELATIVE clause. RESOLUTION ========== Add the RELATIVE clause to the DEFINE POPUP command. This clause prevents blank spaces from appearing within the shortcut menu. Change the DEFINE POPOP command to read: DEFINE POPUP Test SHORTCUT RELATIVE STATUS ====== This behavior is by design. MORE INFORMATION ================ If the DEFINE POPUP command lacks the RELATIVE clause, the order of a particular menu bar depends on its bar number. In the example below, the shortcut menu contains three system menu bars and a bar defined as "BAR 4." Bars 1, 2, and 3 are not defined; therefore, three spaces appear between the "Paste" and "Date" bar items. The Menu Builder automatically places the RELATIVE clause on the DEFINE POPUP command it uses to create shortcut menus. Steps to Reproduce Behavior --------------------------- 1. Create a program that contains the following code: DEFINE POPUP Test SHORTCUT DEFINE BAR _MED_CUT OF Test PROMPT "Cut" DEFINE BAR _MED_COPY OF Test PROMPT "Copy" DEFINE BAR _MED_PASTE OF Test PROMPT "Paste" DEFINE BAR 4 OF Test PROMPT "Date" ON SELECTION BAR 4 OF Test KEYBOARD DTOC(DATE()) ACTIVATE POPUP Test AT MROW(),MCOL() 2. Run the program. The shortcut menu contains several blanks lines within it. 3. Click the mouse and the shortcut menu disappears. REFERENCES ========== Visual FoxPro 5.0; search on: DEFINE POPUP command Additional query words: kbdsd VFoxWin ====================================================================== Keywords : kbvfp500 kbvfp600 Technology : kbVFPsearch kbAudDeveloper kbVFP500 kbVFP600 Version : WINDOWS:5.0,6.0 ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1999.