GoDiagram Web Reference
CreateSheet Method (GoView)

This method is called by the constructor to create a page object for this view.
Syntax
'Declaration
 
Public Overridable Function CreateSheet() As GoSheet
public virtual GoSheet CreateSheet()

Return Value

a GoGroup including a bounded, shadowed GoGrid filled with the GoDocument.PaperColor positioned at the origin.
Remarks
If you need to use your own subclass of GoSheet, this is one natural place to create it if you create more than one view. Otherwise you can just set the Sheet property. By default this does:
              public virtual GoSheet CreateSheet() {
                GoSheet sheet = new GoSheet();
                sheet.Visible = (this.SheetStyle != GoViewSheetStyle.None);
                sheet.Printable = false;
                sheet.Selectable = false;
                // the following three lines are executed only in WinForms, in a try-catch:
                  PrintDocument pd = new PrintDocument();
                  PageSettings ps = pd.DefaultPageSettings;
                  sheet.UpdateBounds(ps, this.PrintScale);
                GoRectangle paper = sheet.Paper;
                Color color = this.Document.PaperColor;
                if (color == Color.Empty)
                  color = Color.White;
                paper.BrushColor = color;
                return sheet;
              }
            
The BackgroundHasSheet setter will automatically call this method and set the Sheet property, which will add that sheet to this view's background layer, as if: this.BackgroundLayer.Add(s);
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GoView Class
GoView Members
BackgroundHasSheet Property

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback