Spread Windows Forms 7.0 Product Documentation
ButtonDrawMode Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SpreadView Class : ButtonDrawMode Property


Glossary Item Box

Gets or sets whether to display buttons in button and combo box cells in the view.

Syntax

Visual Basic (Declaration) 
Public Property ButtonDrawMode As ButtonDrawModes
Visual Basic (Usage)Copy Code
Dim instance As SpreadView
Dim value As ButtonDrawModes
 
instance.ButtonDrawMode = value
 
value = instance.ButtonDrawMode
C# 
public ButtonDrawModes ButtonDrawMode {get; set;}

Property Value

ButtonDrawModes setting that specifies how buttons are drawn

Remarks

Use this property to limit where buttons are displayed in the spreadsheet. You can combine values using the OR logical operator. You can also perform the equivalent of OR-ing by adding the numeric values 1 (current cell), 2 (current column), 4 (current row), 8 (always button), and 16 (always combo box) for the combination you want.

When the OperationMode property is set to Row Mode, RowMode uses the ButtonDrawMode property. The active row is always painted with a selection bar. The buttons are painted or not painted based on the setting of the ButtonDrawMode property. (Note, in Spread COM, RowMode ignored the ButtonDrawMode property. Before editing the active row, the active row was painted with a selection bar but without buttons. After editing the active row, the active row was painted with buttons but without a selection bar. In Spread for Windows Forms, there is no distinction between before and after editing.)

Create a button or combo box cell using the ButtonCellType or ComboBoxCellType. class For an overview of these graphical cell types, refer to Working with Graphical Cell Types.

Example

This example sets the ButtonDrawMode property.
C#Copy Code
FarPoint.Win.Spread.SpreadView sv = fpSpread1.GetRootWorkbook();
sv.Sheets[0].Cells[0, 0].CellType = new FarPoint.Win.Spread.CellType.ButtonCellType();
sv.ButtonDrawMode = FarPoint.Win.Spread.ButtonDrawModes.CurrentRow;
VB.NETCopy Code
Dim sv As FarPoint.Win.Spread.SpreadView = FpSpread1.GetRootWorkbook
sv.Sheets(0).Cells(0, 0).CellType = New FarPoint.Win.Spread.CellType.ButtonCellType()
sv.ButtonDrawMode = FarPoint.Win.Spread.ButtonDrawModes.CurrentRow

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.