DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Writing a SCOadmin manager

Using print controls

Print menu options can be incorporated into managers running in graphical mode (they are not supported in character mode because this function is implemented via the desktop). SaPrint will submit a file for printing without a dialog if the filename is specified. If not, a file selection box is displayed. See SaPrint(TCL_ADM) for more information.

You can add a print button or menu item and a callback which call SaPrint with the name of a temporary file or (in the case of CHARM) call the lp(C) command via CallNonStdCmd(TCL_ADM). To control the print output, use the PRINTCOLS and PRINTROWS environment variables:

   set env(PRINTCOLS) $linelen
   set env(PRINTROWS) $pagelen
where linelen and pagelen are variables containing the desired values. You could also provide the user with a confirmation message that their document has been printed either in the status bar or as a message dialog.

You can use SaPrintSetup to bring up printer setup screen (also not available in character mode - the menu item should still be created for consistency, but stippled using VtSetSensitive(VTCL).

See the SCO Visual Tcl(TM) Reference Guide for more information about the implications of running in character mode.


Next topic: Exiting the application
Previous topic: Navigating in character mode

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003