FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.DrawingSpace Namespace > DrawingToolbar Class > DrawingToolbar Constructor : DrawingToolbar Constructor(Control,PSContainer) |
'Usage Dim control As Control Dim container As PSContainer Dim instance As New DrawingToolbar(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
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10