GrapeCity MultiRow Windows Forms Documentation
Mouse Hover Styles

You can set the style for the mouse hover in the cell style. The mouse hover style can set the backcolor, the background gradation, and the forecolor.

Setting the BackColor and ForeColor

You can set the backcolor and forecolor of the mouse hover style, using the CellStyle.MouseOverBackColor property, and the CellStyle.MouseOverForeColor property.

Using Code

This example sets the MouseOverBackColor and MouseOverForeColor properties.

[VB]

GcMultiRow1.Rows(0).Cells(0).Style.MouseOverBackColor = Color.Yellow 
GcMultiRow1.Rows(0).Cells(0).Style.MouseOverForeColor = Color.Red

[CS]

gcMultiRow1.Rows[0].Cells[0].Style.MouseOverBackColor = Color.Yellow;
gcMultiRow1.Rows[0].Cells[0].Style.MouseOverForeColor = Color.Red;

Setting the Background Gradient

You can can use the CellStyle.MouseOverGradientEffect property to set gradation in the background color of the mouse hover.

Using Code

This example sets the gradation.

[VB]

Dim gradientEffect1 As New GradientEffect() 
gradientEffect1.Colors = New Color() {Color.Green, Color.Yellow}
gradientEffect1.Style = GradientStyle.Horizontal 
gradientEffect1.Direction = GradientDirection.Side 
GcMultiRow1.Rows(0).Cells(0).Style.MouseOverGradientEffect = gradientEffect1

[CS]

GradientEffect gradientEffect1 = new GradientEffect(); 
gradientEffect1.Colors = new Color[] {Color.Green, Color.Yellow}; 
gradientEffect1.Style = GradientStyle.Horizontal; 
gradientEffect1.Direction = GradientDirection.Side;
gcMultiRow1.Rows[0].Cells[0].Style.MouseOverGradientEffect = gradientEffect1;

Settings for Individual Section

You can set the backcolor and background gradation of the mouse hover style for individual sections.

Using Code

This example sets the gradation.

[VB]

Dim gradientEffect1 As New GradientEffect() 
gradientEffect1.Colors = New Color() {Color.Green, Color.Yellow}
gradientEffect1.Style = GradientStyle.Horizontal 
gradientEffect1.Direction = GradientDirection.Side 
GcMultiRow1.Rows(0).MouseOverGradientEffect = gradientEffect1 
GcMultiRow1.Rows(1).MouseOverBackColor = Color.Azure

[CS]

GradientEffect gradientEffect1 = new GradientEffect(); 
gradientEffect1.Colors = new Color[] {Color.Green, Color.Yellow}; 
gradientEffect1.Style = GradientStyle.Horizontal; 
gradientEffect1.Direction = GradientDirection.Side; 
gcMultiRow1.Rows[0].MouseOverGradientEffect = gradientEffect1; 
gcMultiRow1.Rows[1].MouseOverBackColor = Color.Azure;
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options