|
FlexCel Studio for VCL/LCL
|
Miscellaneous printing options.
property PrintOptions: byte;
__property byte PrintOptions;
A lot of simple printing options are defined inside this property as bits inside the number. You can use the following constants or'ed together to set the options::
fpo_LeftToRight = $01; //Print over, then down fpo_Orientation = $02; //0= landscape, 1=portrait fpo_NoPls = $04; //if 1, then PaperSize, Scale, Res, VRes, Copies, and Landscape data have not been obtained from the printer, so they are not valid. fpo_NoColor = $08; //1= Black and white fpo_Draft = $10; //1= Draft quality fpo_Notes = $20; //1= Print Notes fpo_NoOrient = $40; //1=orientation not set fpo_UsePage = $80; //1=use custom starting page number.
To set the printing orientation to landscape or portrait, you can use the following code:
if Landscape then begin Xls.PrintOptions := TPrintOptions(integer(Xls.PrintOptions) and (not (integer(TPrintOptions.Orientation) or integer(TPrintOptions.NoPls))); end else begin //ALWAYS SET NOPLS TO 0 BEFORE CHANGING THE OTHER OPTIONS. Xls.PrintOptions := TPrintOptions(integer(Xls.PrintOptions) and (not integer(TPrintOptions.NoPls))); Xls.PrintOptions := TPrintOptions(integer(Xls.PrintOptions) or integer(TPrintOptions.Orientation)); end;
|
Copyright (c) 2002-2008 TMS Software. All rights reserved.
|
|
What do you think about this topic? Send feedback!
|