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


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
Requirements

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

See Also

Reference

DrawingToolbar Class
DrawingToolbar Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.