Spread Windows Forms 6.0 Product Documentation
AutoMenu Property
See Also  Example Support Options
FarPoint.Win Assembly > FarPoint.Win Namespace > SuperEditBase Class : AutoMenu Property


Glossary Item Box

Gets or sets whether the control displays a context menu that provides basic edit operations.

Syntax

Visual Basic (Declaration) 
Public Overridable Property AutoMenu As Boolean
Visual Basic (Usage)Copy Code
Dim instance As SuperEditBase
Dim value As Boolean
 
instance.AutoMenu = value
 
value = instance.AutoMenu
C# 
public virtual bool AutoMenu {get; set;}

Property Value

Boolean value: true for the control to automatically use the drop-down menu; false otherwise

Remarks

If this property is set to true, when the user clicks the right mouse button while the pointer is over the control at run time, the control displays a pop-up menu. You can create a custom menu using the ContextMenu property. The default menu has the basic edit operations listed in the following table.

Menu Item           Shortcut Keys       Function
Undo Ctrl+U Removes the last edit
Cut Ctrl+X Cuts text to the Clipboard
Copy Ctrl+C Copies text to the Clipboard
Paste Ctrl+P Pastes text from the Clipboard
Delete Ctrl+D Removes text
Select All Ctrl+A Highlights all text in the control    

Any operation that is not available is grayed out (disabled) in the menu.

Example

C#Copy Code
control.EditModeCursorPosition = FarPoint.Win.EditModeCursorPosition.LastKnownPosition;
control.Text = "This is a test for HideSelection";
control.ControlType = FarPoint.Win.ControlType.Normal;
control.SelectionStart = 2;
control.SelectionLength = 5;
control.Selectable = true;
control.HideSelection = false;
control.AutoMenu = true;
textBox1.Text = control.SelectedText();
control.MaxLength = 9;
Visual BasicCopy Code
control.EditModeCursorPosition = FarPoint.Win.EditModeCursorPosition.LastKnownPosition
control.Text = "This is a test for HideSelection"
control.ControlType = FarPoint.Win.ControlType.Normal
control.SelectionStart = 2
control.SelectionLength = 5
control.Selectable = True
control.HideSelection = False
control.AutoMenu = True
TextBox1.Text = control.SelectedText()
control.MaxLength = 9

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.