PowerTools SPREAD for Windows Forms 8.0J
GradientSelectionRenderer コンストラクタ


オーバーロード一覧
オーバーロード説明
GradientSelectionRenderer コンストラクタ(Color,Color,LinearGradientMode,Int32)新しいグラデーション選択範囲レンダラを作成します。  
GradientSelectionRenderer コンストラクタ()グラデーションの付いた選択範囲用のレンダラーを表します。  
次のサンプル コードは、グラデーション レンダラをスプレッドシートに割り当てます。
public class SelectionRenderer : FarPoint.Win.Spread.GradientSelectionRenderer {
    
    private Color clr1;
    
    private Color clr2;
    
    private System.Drawing.Drawing2D.LinearGradientMode gradMode;
    
    private int op;
    
    public SelectionRenderer(Color color1, Color color2, System.Drawing.Drawing2D.LinearGradientMode mode, int opacity) :

            base(Color.Beige, Color.Blue, Drawing2D.LinearGradientMode.ForwardDiagonal, 220) {
        clr1 = color1;
        clr2 = color2;
        gradMode = mode;
        op = opacity;
    }
    
    public new void PaintSelection(Graphics g, int x, int y, int width, int height) {
        if (((width > 0) 
                    && (height > 0))) {
            Color c1 = Color.FromArgb(op, clr1.R, clr1.G, clr1.B);
            Color c2 = Color.FromArgb(op, clr2.R, clr2.G, clr2.B);
            object selectionBrush = new System.Drawing.Drawing2D.LinearGradientBrush(new Rectangle(x, y, width, height), c1,
c2, gradMode);
            g.FillRectangle(selectionBrush, x, y, width, height);
            selectionBrush.Dispose();
        }
    }
}
fpSpread1.SelectionRenderer = new SelectionRenderer(Color.Beige, Color.Blue, Drawing2D.LinearGradientMode.ForwardDiagonal,
220);
FpSpread1.SelectionRenderer = New FarPoint.Win.Spread.GradientSelectionRenderer(Color.Aqua, Color.Bisque, Drawing2D.LinearGradientMode.ForwardDiagonal,
220)
参照

GradientSelectionRenderer クラス
GradientSelectionRenderer メンバ

 

 


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