PowerTools SPREAD for Windows Forms 8.0J
GetOwnerPrintRowPageBreaks メソッド


現在の印刷条件で、指定したシートの行改ページを取得します。
オーバーロード一覧
オーバーロード説明
GetOwnerPrintRowPageBreaks(Graphics,Rectangle,Int32,Boolean)現在の印刷条件で、指定したシートの行改ページを取得します。  
GetOwnerPrintRowPageBreaks(Graphics,Rectangle,Int32,Boolean,OwnerPrintInfo)現在の印刷条件で、指定したシートの行改ページを取得します。  
解説
reCalc は最適化のためのパラメータです。このメソッドの前に GetOwnerPrintColumnPageBreaks メソッドが呼び出される場合は、このパラメータを False に設定してください。
次のサンプルコードは、改ページを取得します。
private System.Drawing.Printing.PrintDocument pd; 

private void pd_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs ev) 
{ 
int[] i; 
Rectangle rect = new Rectangle(0, 0, 1000, 500); 
int cnt = fpSpread1.GetOwnerPrintPageCount(ev.Graphics, rect, 0); 

fpSpread1.OwnerPrintDraw(ev.Graphics, rect, 0, 1); 

i = fpSpread1.GetOwnerPrintRowPageBreaks(ev.Graphics, rect, 0, true);
    foreach (object o in i) 
    { 
    listBox1.Items.Add(o); 
    } 
}
    
private void Form1_Load(object sender, System.EventArgs e)
{
pd = new System.Drawing.Printing.PrintDocument(); 
pd.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.pd_PrintPage); 
}

private void button1_Click(object sender, System.EventArgs e)
{
pd.Print();
}

Private WithEvents pd As New System.Drawing.Printing.PrintDocument()

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
pd.Print()
End Sub

Private Sub pd_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles pd.PrintPage
Dim rect As New Rectangle(0, 0, 500, 500)
Dim cnt As Integer = FpSpread1.GetOwnerPrintPageCount(e.Graphics, rect, 0)
Dim i() As Integer
Dim o As Object

FpSpread1.OwnerPrintDraw(e.Graphics, rect, 0, 1)

Dim isa As FarPoint.Win.Spread.Model.ISheetAxisModel
isa = FpSpread1.ActiveSheet.Models.RowAxis
isa.SetPageBreak(3, True)

i = FpSpread1.GetOwnerPrintRowPageBreaks(e.Graphics, rect, 0, True)

        For Each o In i
            ListBox1.Items.Add(o)
        Next
End Sub
参照

FpSpread クラス
FpSpread メンバ

開発者ガイド

改ページの追加

 

 


© 2004-2015, GrapeCity inc. All rights reserved.