Spread Windows Forms 8.0 Product Documentation > Developer's Guide > Customizing Interaction with Cell Types > Working with Graphical Cell Types > Setting a Progress Indicator Cell |
A progress indicator cell displays a progress indicator control across the entire cell. You can specify the color of the fill, the text to display, the color of the text and other properties.
To create a cell that acts like a progress indicator, use the ProgressCellType class. Create a progress indicator cell using the procedure described here.
You can fill in the indicator with a solid color, by default, or with individual bars, as shown in this figure.
You can customize the display and operation of the progress indicator in the cell by setting the following properties.
Property |
Customization |
---|---|
BackgroundImage |
Set the background image for the cell. |
FillColor |
Set the color to use for the filled part of the progress indicator. |
FillColor2 |
Set the second fill color to use for the gradient part of the progress indicator. |
FillTextColor |
Set the color to use for the text in the filled part of the indicator. |
GradientMode |
Set the gradient mode for a gradient style progress indicator. |
Maximum |
Set the maximum value for user entry. |
Minimum |
Set the minimum value for user entry. |
Orientation |
Set the orientation of the progress bar. |
Picture |
Set the image to use for the progress bar when the style is set to Picture. |
ShowText |
Set whether the percent filled string is displayed. |
Style |
Set the style of the progress bar(s). |
Text |
Set the string to use when TextStyle is set to Custom. |
TextStyle |
Set how the text portion of the progress bar is displayed. |
With these properties, you can set the various aspects of the text, you can set a picture to display, and you can define the colors, even specifying two colors for a gradient from one color to another.
Note that some graphical elements in certain cell types are affected by XP themes (visual styles). Setting the VisualStyles property of the Spread component to "off" can allow visual customizations of those graphical cell types to work as expected. For more information, refer to Using XP Themes with the Component.
For more information on the properties and methods of this cell type, refer to the ProgressCellType class.
C# |
Copy Code
|
---|---|
FarPoint.Win.Spread.CellType.ProgressCellType progcell = new FarPoint.Win.Spread.CellType.ProgressCellType();
progcell.FillColor = Color.Red;
fpSpread1.ActiveSheet.Cells[0, 0].CellType = progcell;
|
VB |
Copy Code
|
---|---|
Dim progcell As New FarPoint.Win.Spread.CellType.ProgressCellType() progcell.FillColor = Color.Red FpSpread1.ActiveSheet.Cells(0, 0).CellType = progcell |
Or right-click on the cell or cells and select Cell Type. From the list, select Progress. In the CellType editor, set the properties you need. Click Apply.