Skip to main content

TdxSpreadSheetSetPrintArea Class

An action object corresponding to the SetPrintArea command provided by the Spreadsheet and Report Designer controls.

Declaration

TdxSpreadSheetSetPrintArea = class(
    TdxSpreadSheetCustomPrintingAction
)

Remarks

This class does not introduce any new public members. Executing this action object sets the current cell selection as the Table View worksheet’s custom print area. If the worksheet already has a custom print area, it is updated according to the cell selection.

If only a single cell is selected, the action object invokes the confirmation message box, prompting an end-user to either confirm or cancel assigning the selected cell as the target print area:

UI elements linked to a TdxSpreadSheetSetPrintArea action object are enabled only if the following conditions are met:

  • An in-place editor is inactive (the active worksheet‘s IsEditing property returns False);

  • The current cell selection is not empty (that is the worksheet’s Selection.Items collection has at least a single item).

To localize the caption and hint displayed by UI elements linked to a TdxSpreadSheetSetPrintArea action object, use the sdxSpreadSheetActionSetPrintAreaCaption and sdxSpreadSheetActionSetPrintAreaHint resource strings, respectively.

Note

To toggle the custom print area outline and change its color, use the Spreadsheet/Report Designer control’s OptionsView.PrintAreas and OptionsPrint.PrintAreaColor properties, respectively.

See Also