Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I use the print method to print an edit box ?
Message
 
 
To
01/05/2002 17:09:06
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00651623
Message ID:
00651877
Views:
13
>Hello :-)
>
>Can I use the "print method" to print the contents of a edit box and if so, could I have an example of the command.
>
>Thanks,
>
>-Greg

EditBox right click -
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)
return
Form statistics and its report could be found in Download section (the first version, I made couple of changes in it since then)
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform