ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

PrintInfo.PageSettings Property

Gets or sets the PageSettings for printing.

[Visual Basic]

Public Property PageSettings As PageSettings

[C#]

public PageSettings PageSettings {get;set;}

[Delphi]

public property PageSettings: PageSettings read get_PageSettings write set_PageSettings;

Example

The following code sets the pages' margins for printing:

·      Visual Basic

       Me.C1TrueDBGrid1.PrintInfo.PageSettings.Margins.Top = 50

       Me.C1TrueDBGrid1.PrintInfo.PageSettings.Margins.Bottom = 25

       Me.C1TrueDBGrid1.PrintInfo.PageSettings.Margins.Left = 50

       Me.C1TrueDBGrid1.PrintInfo.PageSettings.Margins.Right = 50

       ' Invoke print preview.

       Me.C1TrueDBGrid1.PrintInfo.PrintPreview()

·      C#

       this.c1TrueDBGrid1.PrintInfo.PageSettings.Margins.Top = 50;

       this.c1TrueDBGrid1.PrintInfo.PageSettings.Margins.Bottom = 25;

       this.c1TrueDBGrid1.PrintInfo.PageSettings.Margins.Left = 50;

       this.c1TrueDBGrid1.PrintInfo.PageSettings.Margins.Right = 50;

       // Invoke print preview.

       this.C1TrueDBGrid1.PrintInfo.PrintPreview();

·      Delphi

       Self.C1TrueDBGrid1.PrintInfo.PageSettings.Margins.Top := 50;

       Self.C1TrueDBGrid1.PrintInfo.PageSettings.Margins.Bottom := 25;

       Self.C1TrueDBGrid1.PrintInfo.PageSettings.Margins.Left := 50;

       Self.C1TrueDBGrid1.PrintInfo.PageSettings.Margins.Right := 50;

       // Invoke print preview.

       Self.C1TrueDBGrid1.PrintInfo.PrintPreview;

See Also

PrintInfo Class | PrintInfo Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.