PowerTools SPREAD for Windows Forms 10.0J
DrawingToolbar コンストラクタ(Control,PSContainer)


コントロール
コンテナ
指定したコントロールの指定したコンテナに対して新しい描画ツールバーを作成します。
構文
'Declaration
 
Public Function New( _
   ByVal control As Control, _
   ByVal container As PSContainer _
)
'使用法
 
Dim control As Control
Dim container As PSContainer
 
Dim instance As New DrawingToolbar(control, container)
public DrawingToolbar( 
   Control control,
   PSContainer container
)

パラメータ

control
コントロール
container
コンテナ
次のサンプルコードは、実行時に描画ツールバーを使用します。
public void ShowToolbar()
        {
            FarPoint.Win.Spread.DrawingSpace.DrawingToolbar draw = default(FarPoint.Win.Spread.DrawingSpace.DrawingToolbar);
            if (fpSpread1.ActiveSheet != null)
            {
                draw = new FarPoint.Win.Spread.DrawingSpace.DrawingToolbar(fpSpread1, fpSpread1.ActiveSheet.DrawingContainer);
            }
            else
            {
                draw = new FarPoint.Win.Spread.DrawingSpace.DrawingToolbar(fpSpread1, null);
            }
            draw.Visible = true;
            draw.Owner = this;
            draw.Left = this.Left + this.Width - draw.Width / 2;
            draw.Top = this.Top + this.Height / 2 - draw.Height / 2;
        }

private void button1_Click(object sender, EventArgs e)
        {
            ShowToolbar();
        }
Sub ShowToolbar()
       Dim draw As FarPoint.Win.Spread.DrawingSpace.DrawingToolbar
       If Not (FpSpread1.ActiveSheet Is Nothing) Then
           draw = New FarPoint.Win.Spread.DrawingSpace.DrawingToolbar(FpSpread1, FpSpread1.ActiveSheet.DrawingContainer)
       Else
           draw = New FarPoint.Win.Spread.DrawingSpace.DrawingToolbar(FpSpread1, Nothing)
       End If
       draw.Visible = True
       draw.Owner = Me
       draw.Left = Me.Left + Me.Width - draw.Width / 2
       draw.Top = Me.Top + Me.Height / 2 - draw.Height / 2
   End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
       ShowToolbar()
   End Sub
参照

DrawingToolbar クラス
DrawingToolbar メンバ
オーバーロード一覧

 

 


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