Spread Windows Forms 6.0 Product Documentation
StickyNoteCreated Event
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class : StickyNoteCreated Event


Glossary Item Box

Obsoleted. Use NoteCreated instead. Occurs when a sticky note is created on the sheet.

Syntax

Visual Basic (Declaration) 
Public Event StickyNoteCreated As StickyNoteEventHandler
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim handler As StickyNoteEventHandler
 
AddHandler instance.StickyNoteCreated, handler
C# 
public event StickyNoteEventHandler StickyNoteCreated

Event Data

The event handler receives an argument of type StickyNoteEventArgs containing data related to this event. The following StickyNoteEventArgs properties provide information specific to this event.

PropertyDescription
StickyNoteStyleInfo Gets the style information of the sticky note.

Example

This example shows the use of the StickyNoteCreated event handling.
C#Copy Code
private void Form1_Load(object sender, System.EventArgs e)
{
    fpSpread1.ActiveSheet.SetNote(2, 0, "Head of Development");
    fpSpread1.ActiveSheet.Cells[2, 0].NoteStyle = FarPoint.Win.Spread.NoteStyle.StickyNote;
    FarPoint.Win.Spread.DrawingSpace.StickyNoteStyleInfo nsinfo = new FarPoint.Win.Spread.DrawingSpace.StickyNoteStyleInfo();
    nsinfo = fpSpread1.ActiveSheet.GetStickyNoteStyleInfo(2, 0);
    nsinfo.BackColor = Color.Bisque;
    nsinfo.Font = new Font("Tahoma", 24);
    nsinfo.ForeColor = Color.Cyan;
    nsinfo.Width = 320;
    nsinfo.ShapeOutlineColor = Color.Cyan;
    nsinfo.ShapeOutlineThickness = 1;
    nsinfo.ShadowOffsetX = 3;
    nsinfo.ShadowOffsetY = 3;
    fpSpread1.ActiveSheet.SetStickyNoteStyleInfo(2, 0, nsinfo);
}
 
private void fpSpread1_Sheet1_StickyNoteCreated(object sender, FarPoint.Win.Spread.StickyNoteEventArgs e)
{
    MessageBox.Show("The thickness of the outline is " + e.StickyNoteStyleInfo.ShapeOutlineThickness.ToString());
}
Visual BasicCopy Code
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    FpSpread1.ActiveSheet.SetNote(2, 0, "Head of Development")
    FpSpread1.ActiveSheet.Cells(2, 0).NoteStyle = FarPoint.Win.Spread.NoteStyle.StickyNote
    Dim nsinfo As FarPoint.Win.Spread.DrawingSpace.StickyNoteStyleInfo = New FarPoint.Win.Spread.DrawingSpace.StickyNoteStyleInfo
    nsinfo = FpSpread1.ActiveSheet.GetStickyNoteStyleInfo(2, 0)
    nsinfo.BackColor = Color.Bisque
    nsinfo.Font = New Font("Tahoma", 24)
    nsinfo.ForeColor = Color.Cyan
    nsinfo.Width = 320
    nsinfo.ShapeOutlineColor = Color.Cyan
    nsinfo.ShapeOutlineThickness = 1
    nsinfo.ShadowOffsetX = 3
    nsinfo.ShadowOffsetY = 3
    FpSpread1.ActiveSheet.SetStickyNoteStyleInfo(2, 0, nsinfo)
End Sub

Private Sub FpSpread1_Sheet1_StickyNoteCreated(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.StickyNoteEventArgs) Handles FpSpread1_Sheet1.StickyNoteCreated
    MessageBox.Show("The thickness of the outline is " & e.StickyNoteStyleInfo.ShapeOutlineThickness.ToString())
End Sub

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

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