GrapeCity MultiRow Windows Forms Documentation
FlatStyle Property (ButtonCellBase)
Example 


Gets or sets the style of the button's appearance.
Syntax
<DefaultValueAttribute()>
<SRDescriptionAttribute("Indicates the appearance of the Cell when a user moves the mouse over the Cell and clicks.")>
<SRCategoryAttribute("Appearance")>
<LocalizableAttribute(True)>
Public Property FlatStyle As FlatStyle
Dim instance As ButtonCellBase
Dim value As FlatStyle
 
instance.FlatStyle = value
 
value = instance.FlatStyle
[DefaultValue()]
[SRDescription("Indicates the appearance of the Cell when a user moves the mouse over the Cell and clicks.")]
[SRCategory("Appearance")]
[Localizable(true)]
public FlatStyle FlatStyle {get; set;}

Property Value

One of the System.Windows.Forms.FlatStyle values. The default is System.Windows.Forms.FlatStyle.System.
Exceptions
ExceptionDescription
System.ComponentModel.InvalidEnumArgumentExceptionThe specified value is not one of the System.Windows.Forms.FlatStyle values.
Remarks

If the property value is System.Windows.Forms.FlatStyle.Flat, the button appearance is flat with a solid background color. The FlatAppearance property affects the button's background color and the solid border. If the FlatAppearance property does not change, the background color and the border color of the button depend on the background color and the forecolor of the cell in different mouse states and check states; otherwise, the colors are determined by the FlatAppearance property.

The MultiRowFlatButtonAppearance.BorderSize and the MultiRowFlatButtonAppearance.BorderColor of the FlatAppearance have no relation to the border specified by the Cell.Style.

If the property value is System.Windows.Forms.FlatStyle.Popup, the appearance is flat unless the pointer is over the cell or the user presses the mouse button. The FlatAppearance does not affect the pop-up appearance.

If the property value is System.Windows.Forms.FlatStyle.System or System.Windows.Forms.FlatStyle.Standard, the appearance is set by the operating system.

Example
This example sets the FlatStyle property.
GrapeCity.Win.MultiRow.ButtonCell button1 = new GrapeCity.Win.MultiRow.ButtonCell();
button1.Value = "Click The Button";
button1.EllipsisString = "*";
button1.FlatStyle = FlatStyle.Popup;
button1.Ellipsis = GrapeCity.Win.MultiRow.MultiRowEllipsisMode.EllipsisEnd;
GrapeCity.Win.MultiRow.CheckBoxCell check2 = new GrapeCity.Win.MultiRow.CheckBoxCell();
GrapeCity.Win.MultiRow.Template template1 = GrapeCity.Win.MultiRow.Template.CreateGridTemplate(new GrapeCity.Win.MultiRow.Cell[] {button1, check2}, 160, GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.ColumnHeader | GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.RowHeaderAutoNumber);
gcMultiRow1.Template = template1;
gcMultiRow1.RowCount = 3;
Dim button1 As New GrapeCity.Win.MultiRow.ButtonCell()
button1.Value = "Click The Button"
button1.EllipsisString = "*"
button1.FlatStyle = FlatStyle.Popup
button1.Ellipsis = GrapeCity.Win.MultiRow.MultiRowEllipsisMode.EllipsisEnd
Dim check2 As New GrapeCity.Win.MultiRow.CheckBoxCell()
Dim template1 As GrapeCity.Win.MultiRow.Template = GrapeCity.Win.MultiRow.Template.CreateGridTemplate(New GrapeCity.Win.MultiRow.Cell() {button1, check2}, 160, GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.ColumnHeader Or GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.RowHeaderAutoNumber)
GcMultiRow1.Template = template1
GcMultiRow1.RowCount = 3
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

Reference

ButtonCellBase Class
ButtonCellBase Members
FlatAppearance Property

 

 


Copyright © GrapeCity, inc. All rights reserved.