You can set support for XP themes for the cells and graphical elements in the Spread component. The VisualStyles property for the Spread component causes the cells to have the appearance of the XP theme. You can create a manifest file so that the scroll bars have a theme appearance.
By default the VisualStyles property is set to Auto, so the graphical cell types paint the way the theme is set to paint (for example the button is themed so you cannot set a background color with the BackColor property). You either need to turn off VisualStyles for the Spread component or create a custom cell type where you override the PaintCell and GetEditorControl methods and then set the VisualStyles property of the Appearance object to off. A third alternative is to leave it "on" for the Spread component but turn it "off" for the individual control (such as the FpProgress control for the progress indicator cell).
Applying a sheet skin causes the VisualStyles property to be set to false.
If you are on Windows XP, then you need to add the following line of code to turn off the XP themes in the Spread.
C# |
Copy Code
|
---|---|
fpSpread1.VisualStyles = FarPoint.Win.VisualStyles.Off; |
Visual Basic |
Copy Code
|
---|---|
FpSpread1.VisualStyles = FarPoint.Win.VisualStyles.Off |
Note:
Add a line of code that allows the theme support by setting the VisualStyles property for the Spread component.
This example sets the VisualStyles property to on to allow XP themes.
C# |
Copy Code
|
---|---|
fpSpread1.VisualStyles = FarPoint.Win.VisualStyles.On; |
VB |
Copy Code
|
---|---|
fpSpread1.VisualStyles = FarPoint.Win.VisualStyles.On |