Skip to main content

TdxSpreadSheetPageMarginsGallery Class

An action object that implements the PageMarginsGallery end-user command in Spreadsheet and Report Designer-based applications.

Declaration

TdxSpreadSheetPageMarginsGallery = class(
    TdxSpreadSheetCustomGalleryAction,
    IdxActionGalleryWithDescriptionTabbedText
)

Remarks

This class does not introduce any new public members. Its overridden Execute function call applies one of the three predefined page margin sets (that is, normal, wide, and narrow) to the active worksheet‘s print page margin settings, depending on an item selected in the linked UI gallery:

  • Normal. This option sets 0.75-inch margins at the top and bottom page borders, 0.7-inch margins at the left and right borders, and defines the header and footer, each is 0.3 inch in height.

  • Wide. This default option sets single inch margins at all page borders, and defines the half-inch header and footer.

  • Narrow. Sets 0.75-inch margins at the top and bottom of the printed page, 0.25-inch margins at the left and right borders, and defines the header and footer, each is 0.3 inch in height.

If the active worksheet’s custom page margin and header/footer sizes match the corresponding settings of a predefined margin set, the gallery highlights the corresponding item. The gallery highlights the default option if the active worksheet has the default margin settings:

UI elements linked to a TdxSpreadSheetPageMarginsGallery action object are enabled only if the active worksheet has focus (that is, a focused cell or floating container).

To localize the caption displayed by a Ribbon gallery item or toolbar subitem linked to a TdxSpreadSheetPageMarginsGallery object, use the sdxSpreadSheetActionPageMarginsGalleryCaption resource string. To localize the “Normal”, “Wide”, and “Narrow” options within the gallery, use the sdxSpreadSheetActionPageMarginsGalleryNormalMarginsCaption, sdxSpreadSheetActionPageMarginsGalleryWideMarginsCaption, and sdxSpreadSheetActionPageMarginsGalleryNarrowMarginsCaption resource strings, respectively.

See Also