activate popup Edit_Box at mrow(), mcol()Form's Load: =Create_Popup() && Creates popup Edit_Box
******************************************************************** * Description.......: Create_Popup - creates shortcut menu for edit boxes * Calling Samples...: * Parameter List....: tcPopupName, toForm * Created by........: Cetin Basoz * Modified by.......: Nadya Nosonovsky 01/25/2002 10:30:05 AM ******************************************************************** lparameter tcPopupName, toForm if vartype(m.tcPopupName)<>"C" tcPopupName = 'Edit_Box' endif DEFINE POPUP (m.tcPopupName) SHORTCUT RELATIVE DEFINE BAR _med_undo OF (m.tcPopupName) PROMPT "\<Undo" ; KEY CTRL+Z, "Ctrl+Z" ; MESSAGE "Undoes the last command or action" DEFINE BAR _med_redo OF (m.tcPopupName) PROMPT "Re\<do" ; KEY CTRL+R, "Ctrl+R" ; MESSAGE "Repeats the last command or action" DEFINE BAR 3 OF (m.tcPopupName) PROMPT "\-" DEFINE BAR _med_cut OF (m.tcPopupName) PROMPT "Cu\<t" ; KEY CTRL+X, "Ctrl+X" ; MESSAGE "Removes the selection and places it onto the Clipboard" DEFINE BAR _med_copy OF (m.tcPopupName) PROMPT "\<Copy" ; KEY CTRL+C, "Ctrl+C" ; MESSAGE "Copies the selection onto the Clipboard" DEFINE BAR _med_paste OF (m.tcPopupName) PROMPT "\<Paste" ; KEY CTRL+V, "Ctrl+V" ; MESSAGE "Pastes the contents of the Clipboard" DEFINE BAR _med_slcta OF (m.tcPopupName) PROMPT "Se\<lect All" ; KEY CTRL+A, "Ctrl+A" ; MESSAGE "Selects all text or items in the current window" DEFINE BAR 8 OF (m.tcPopupName) PROMPT "P\<rint content" ; && _mfi_sysprint KEY CTRL+P, "Ctrl+P" ; MESSAGE "Prints window's content" local lnBars, lcValue lnBars = cntbar('Edit_Box') on selection bar m.lnBars of Edit_Box do PrintContent with _screen.ActiveForm.ActiveControl.Value
******************************************************************** * Description.......: PrintContent - prints EditBox content * Calling Samples...: * Parameter List....: tcValue * Created by........: Nadya Nosonovsky 01/25/2002 12:33:03 PM * Modified by.......: ******************************************************************** lparameters tcValue if vartype(m.tcValue)<>"C" tcValue = "Nadya's test" endif local lnSelect lnSelect = select() select 0 create cursor dummy (cMessage M, cTitle M) append blank replace dummy.cMessage with m.tcValue, cTitle with "Procedure's code" report form Statistics to printer prompt noconsole use && Close dummy select (m.lnSelect) returnForm statistics and its report could be found in Download section (the first version, I made couple of changes in it since then)