Spread Windows Forms 12.0 Product Documentation
DrawingToolbar Constructor(Control,PSContainer)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.DrawingSpace Namespace > DrawingToolbar Class > DrawingToolbar Constructor : DrawingToolbar Constructor(Control,PSContainer)
Control
Container
Creates a new drawing toolbar for the specified container in the specified control.
Syntax
'Declaration
 
Public Function New( _
   ByVal control As Control, _
   ByVal container As PSContainer _
)
'Usage
 
Dim control As Control
Dim container As PSContainer
 
Dim instance As New DrawingToolbar(control, container)
public DrawingToolbar( 
   Control control,
   PSContainer container
)

Parameters

control
Control
container
Container
Example
This example uses the drawing toolbar at run time.
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
See Also

Reference

DrawingToolbar Class
DrawingToolbar Members
Overload List