Spread WinForms 15
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread.CellType Namespace / EnhancedRowHeaderRenderer Class / PaintHeader Method / PaintHeader(Graphics,Rectangle,Rectangle,Color,Color,Font,HorizontalAlignment,VerticalAlignment,Boolean,Boolean,String,String,ButtonTextAlign,TextOrientation,Boolean,Int32,Color,Color,Image,Image,Boolean,HotkeyPrefix,VisualStyles,Boolean,Boolean,Appearance,Double) Method
Graphics device interface for painting the header cell
Location and size of a rectangular region
Rectangular region for the text
Background color of the header cell
Color of the text
Font of the text
Horizontal alignment of the text
Vertical alignment of the text
Whether to paint the header cell as pressed
Whether the header cell has focus
Text to display in the header cell
Text to display in the header cell when pressed
Alignment of the text and image in the header cell
Orientation of the text with respect to the button picture in the header cell
Whether to wrap text to multiple lines
Size of the shadow
Dark color
Light color
Picture to display when the button is not pressed
Picture to display when the button is pressed
Whether the button is locked
Letter to underline as a hotkey prefix
Visual styles setting
Whether the mouse is over the header cell
Whether to draw as right-to-left
Appearance settings of the header cell
Text rotation angle


In This Topic
PaintHeader(Graphics,Rectangle,Rectangle,Color,Color,Font,HorizontalAlignment,VerticalAlignment,Boolean,Boolean,String,String,ButtonTextAlign,TextOrientation,Boolean,Int32,Color,Color,Image,Image,Boolean,HotkeyPrefix,VisualStyles,Boolean,Boolean,Appearance,Double) Method
In This Topic
Paints the header cell with the look and feel of Excel 2007.
Syntax
'Declaration
 
Public Overloads Overrides Sub PaintHeader( _
   ByVal g As Graphics, _
   ByVal r As Rectangle, _
   ByVal rectTextIn As Rectangle, _
   ByVal backColor As Color, _
   ByVal foreColor As Color, _
   ByVal font As Font, _
   ByVal halign As HorizontalAlignment, _
   ByVal valign As VerticalAlignment, _
   ByVal pressed As Boolean, _
   ByVal focus As Boolean, _
   ByVal text As String, _
   ByVal textDown As String, _
   ByVal nAlign As ButtonTextAlign, _
   ByVal textOrientation As TextOrientation, _
   ByVal wordWrap As Boolean, _
   ByVal shadowSize As Integer, _
   ByVal darkColor As Color, _
   ByVal lightColor As Color, _
   ByVal pictUp As Image, _
   ByVal pictDown As Image, _
   ByVal bLocked As Boolean, _
   ByVal prefix As HotkeyPrefix, _
   ByVal style As VisualStyles, _
   ByVal mouseOver As Boolean, _
   ByVal rightToLeft As Boolean, _
   ByVal appearance As Appearance, _
   ByVal textRotationAngle As Double _
) 
 
'Usage
 
Dim instance As EnhancedRowHeaderRenderer
Dim g As Graphics
Dim r As Rectangle
Dim rectTextIn As Rectangle
Dim backColor As Color
Dim foreColor As Color
Dim font As Font
Dim halign As HorizontalAlignment
Dim valign As VerticalAlignment
Dim pressed As Boolean
Dim focus As Boolean
Dim text As String
Dim textDown As String
Dim nAlign As ButtonTextAlign
Dim textOrientation As TextOrientation
Dim wordWrap As Boolean
Dim shadowSize As Integer
Dim darkColor As Color
Dim lightColor As Color
Dim pictUp As Image
Dim pictDown As Image
Dim bLocked As Boolean
Dim prefix As HotkeyPrefix
Dim style As VisualStyles
Dim mouseOver As Boolean
Dim rightToLeft As Boolean
Dim appearance As Appearance
Dim textRotationAngle As Double
 
instance.PaintHeader(g, r, rectTextIn, backColor, foreColor, font, halign, valign, pressed, focus, text, textDown, nAlign, textOrientation, wordWrap, shadowSize, darkColor, lightColor, pictUp, pictDown, bLocked, prefix, style, mouseOver, rightToLeft, appearance, textRotationAngle)

Parameters

g
Graphics device interface for painting the header cell
r
Location and size of a rectangular region
rectTextIn
Rectangular region for the text
backColor
Background color of the header cell
foreColor
Color of the text
font
Font of the text
halign
Horizontal alignment of the text
valign
Vertical alignment of the text
pressed
Whether to paint the header cell as pressed
focus
Whether the header cell has focus
text
Text to display in the header cell
textDown
Text to display in the header cell when pressed
nAlign
Alignment of the text and image in the header cell
textOrientation
Orientation of the text with respect to the button picture in the header cell
wordWrap
Whether to wrap text to multiple lines
shadowSize
Size of the shadow
darkColor
Dark color
lightColor
Light color
pictUp
Picture to display when the button is not pressed
pictDown
Picture to display when the button is pressed
bLocked
Whether the button is locked
prefix
Letter to underline as a hotkey prefix
style
Visual styles setting
mouseOver
Whether the mouse is over the header cell
rightToLeft
Whether to draw as right-to-left
appearance
Appearance settings of the header cell
textRotationAngle
Text rotation angle
See Also