Spread Windows Forms 7.0 Product Documentation
CellTouchStrip Constructor
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > CellTouchStrip Class : CellTouchStrip Constructor


spread
The spread.

Glossary Item Box

Creates a CellTouchStrip instance.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal spread As FpSpread _
)
Visual Basic (Usage)Copy Code
Dim spread As FpSpread
 
Dim instance As New CellTouchStrip(spread)
C# 
public CellTouchStrip( 
   FpSpread spread
)

Parameters

spread
The spread.

Example

This example creates a touch strip.
C#Copy Code
void autoFill_Click(object sender, EventArgs e)
        {
         FarPoint.Win.Spread.SpreadView activeView = fpSpread1.GetRootWorkbook().GetActiveWorkbook();
            if (activeView != null)
            {
                activeView.ShowAutoFillIndicator();
            }
        }

private void Form1_Load(object sender, EventArgs e)
    {
        fpSpread1.AllowDragFill = true;
    }
        private void fpSpread1_TouchStripOpening(object sender, FarPoint.Win.Spread.TouchStripOpeningEventArgs e)
        {
            e.Cancel = true;
            FarPoint.Win.Spread.CellTouchStrip touchStrip = new FarPoint.Win.Spread.CellTouchStrip(fpSpread1);
            ToolStripSeparator separator = new ToolStripSeparator();
            FarPoint.Win.Spread.TouchStripButton autoFill = new FarPoint.Win.Spread.TouchStripButton("AutoFill", System.Drawing.Image.FromFile("C:\\SpreadWin7\\dragfill.png") );
            autoFill.Click += autoFill_Click;
            touchStrip.Items.AddRange(new ToolStripItem[] { separator, autoFill });
            touchStrip.Show(new Point(e.X - 20, e.Y - 35 - touchStrip.Height));
        }
VB.NETCopy Code
Private Sub autoFill_Click(sender As Object, e As EventArgs)
               Dim activeView As FarPoint.Win.Spread.SpreadView = fpSpread1.GetRootWorkbook().GetActiveWorkbook()
               If activeView IsNot Nothing Then
                              activeView.ShowAutoFillIndicator()
               End If
End Sub

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
     FpSpread1.AllowDragFill = True
End Sub
Private Sub fpSpread1_TouchStripOpening(sender As Object, e As FarPoint.Win.Spread.TouchStripOpeningEventArgs)
               e.Cancel = True
               Dim touchStrip As New FarPoint.Win.Spread.CellTouchStrip(fpSpread1)
               Dim separator As New ToolStripSeparator()
               Dim autoFill As New FarPoint.Win.Spread.TouchStripButton("AutoFill", System.Drawing.Image.FromFile("C:\SpreadWin7\dragfill.png"))
               AddHandler autoFill.Click, AddressOf autoFill_Click
               touchStrip.Items.AddRange(New ToolStripItem() {separator, autoFill})
               touchStrip.Show(New Point(e.X - 20, e.Y - 35 - touchStrip.Height))
End Sub

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.