Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EDIT shortcut menu - weird behavior.
Message
From
21/08/2006 23:41:14
 
 
To
21/08/2006 09:23:42
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Miscellaneous
Thread ID:
01146812
Message ID:
01147477
Views:
33
Heh. I changed the tabindex to 2 and at first right-click VFP raised a GPF, saying "menu manager internal error". Weird. VFP9 SP1 here.

>
>two BUGs are SURE
>
>TRY THIS, it can to be sufficient in simple applications
>
>PUBLIC oform1
>
>oform1=NEWOBJECT("form1")
>oform1.Show
>RETURN
>
>
>DEFINE CLASS form1 AS form
>
>   Height = 201
>   Width = 312
>   DoCreate = .T.
>   Caption = "Form1"
>   showwindow = 2
>   desktop = .t.
>
>
> ADD OBJECT CMD AS COMMANDBUTTON
>
>  ADD OBJECT edit2 AS editbox WITH ;
>      Height = 80, ;
>      Left = 26, ;
>      Top = 106, ;
>      Width = 259, ;
>      tabindex = 1,;  && bug, set tabindex to 2
>      Value = 'Shortcut does work properly here' + chr(13) + ;
>         'The shortcut is display on cursor position'
>
>
>   PROCEDURE DefinePopup
>      DEFINE POPUP FoxShortcutMenu SHORTCUT RELATIVE
>      DEFINE BAR _med_undo OF foxshortcutmenu PROMPT "\<Undo" ;
>         KEY CTRL+Z, "Ctrl+Z"
>      DEFINE BAR _med_redo OF foxshortcutmenu PROMPT "Re\<do" ;
>         KEY CTRL+R, "Ctrl+R"
>      DEFINE BAR _med_sp100 OF foxshortcutmenu PROMPT "\-"
>      DEFINE BAR _med_cut OF foxshortcutmenu PROMPT "Cu\<t" ;
>         KEY CTRL+X, "Ctrl+X"
>      DEFINE BAR _med_copy OF foxshortcutmenu PROMPT "\<Copy" ;
>         KEY CTRL+C, "Ctrl+C"
>      DEFINE BAR _med_paste OF foxshortcutmenu PROMPT "\<Paste" ;
>         KEY CTRL+V, "Ctrl+V"
>      DEFINE BAR _med_pstlk OF foxshortcutmenu PROMPT "Paste \<Special..."
>      DEFINE BAR _med_clear OF foxshortcutmenu PROMPT "Cle\<ar"
>      DEFINE BAR _med_sp200 OF foxshortcutmenu PROMPT "\-"
>      DEFINE BAR _med_slcta OF foxshortcutmenu PROMPT "Se\<lect All" ;
>         KEY CTRL+A, "Ctrl+A"
>      DEFINE BAR _med_sp300 OF foxshortcutmenu PROMPT "\-"
>      DEFINE BAR _med_find OF foxshortcutmenu PROMPT "\<Find..." ;
>         KEY CTRL+F, "Ctrl+F"
>      DEFINE BAR _med_repl OF foxshortcutmenu PROMPT "R\<eplace..." ;
>         KEY CTRL+L, "Ctrl+L"
>  ENDPROC
>
>   PROCEDURE edit2.gotfocus
>       ThisForm.DefinePopup()  && define the popup
>   ENDPROC
>
>   PROCEDURE edit2.lostfocus
>       RELEASE POPUPS FoxShortcutMenu && release the popup
>   ENDPROC
>
>   PROCEDURE edit2.RightClick
>     _SCREEN.FontName=THISFORM.FONTNAME
>     * ...
>      ACTIVATE POPUP FoxShortcutMenu AT MROW(0),MCOL(0) && a bug: AT  uses SCREEN fontxxx to compute foxels
>   ENDPROC
>
>ENDDEFINE
>
Grigore Dolghin
Class Software.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform