Search
WorksheetRenameForm Class
Remarks See Also
 






Represents a form that can be used specify a name for a worksheet.

Namespace: MindFusion.Spreadsheet.WinForms
Assembly: MindFusion.Spreadsheet.WinForms.StandardForms

 Syntax

C#  Copy Code

public class WorksheetRenameForm : Form

Visual Basic  Copy Code

Public Class WorksheetRenameForm
    Inherits Form

 Remarks

This form can be used to prompt the user for the name of a worksheet. To use the form, create an instance of the WorksheetRenameForm class, providing the initial name to display, and call the ShowDialog method. The user's choice can be obtained from the WorksheetName property. The following image shows the form:

 Example

The code below demonstrates how to use the form to edit the name of an existing worksheet.

C#  Copy Code

var form = new WorksheetRenameForm(worksheet.Name);
if (form.ShowDialog(this) == DialogResult.OK)
{
    using (workbook.StartChangeOperation(worksheet))
        worksheet.Name = form.WorksheetName;
}

Visual Basic  Copy Code

Dim form = New WorksheetRenameForm(worksheet.Name)
If form.ShowDialog(Me) = DialogResult.OK Then

    Using workbook.StartChangeOperation(worksheet)
        worksheet.Name = form.WorksheetName
    End Using

End If

 Inheritance Hierarchy

System.Object
    System.MarshalByRefObject
        System.ComponentModel.Component
            System.Windows.Forms.Control
                System.Windows.Forms.ScrollableControl
                    System.Windows.Forms.ContainerControl
                        System.Windows.Forms.Form
                            MindFusion.Spreadsheet.WinForms.WorksheetRenameForm

 See Also