Spread Windows Forms 18
FarPoint.Win Assembly / FarPoint.Win Namespace / FpButton Class / DoPaint Method / DoPaint(Graphics,Rectangle,Color,Color,Font,HorizontalAlignment,VerticalAlignment,Boolean,Boolean,String,String,ButtonTextAlign,TextOrientation,Boolean,Int32,Color,Color,Image,Image,Boolean,HotkeyPrefix,VisualStyles,Boolean) Method
GDI+ graphics surface
Image rectangle
Background color
Foreground (text) color
Font of text
Horizontal alignment
Vertical alignment
Whether the button is pressed
Whether it is in focus
Text of button when not pressed
Text of pressed button
Alignment of text with respect to image in button
Orientation of text
Whether text wraps to multiple lines
Size of the shadow around the button
Color of the shadow (dark part of button)
Color of light part of button
Picture (image) when button is not pressed
Picture (image) when button is pressed
Whether the cell is locked
Whether the ampersand character underlines text
Determines the button style
True if mouse is over button


In This Topic
    DoPaint(Graphics,Rectangle,Color,Color,Font,HorizontalAlignment,VerticalAlignment,Boolean,Boolean,String,String,ButtonTextAlign,TextOrientation,Boolean,Int32,Color,Color,Image,Image,Boolean,HotkeyPrefix,VisualStyles,Boolean) Method
    In This Topic
    Paints the cell with the button.
    Syntax
    'Declaration
     
    
    Public Overloads Shared Sub DoPaint( _
       ByVal g As Graphics, _
       ByVal r 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 _
    ) 
    'Usage
     
    
    Dim g As Graphics
    Dim r 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
     
    FpButton.DoPaint(g, r, backColor, foreColor, font, halign, valign, pressed, focus, text, textDown, nAlign, textOrientation, wordWrap, shadowSize, darkColor, lightColor, pictUp, pictDown, bLocked, prefix, style, mouseOver)

    Parameters

    g
    GDI+ graphics surface
    r
    Image rectangle
    backColor
    Background color
    foreColor
    Foreground (text) color
    font
    Font of text
    halign
    Horizontal alignment
    valign
    Vertical alignment
    pressed
    Whether the button is pressed
    focus
    Whether it is in focus
    text
    Text of button when not pressed
    textDown
    Text of pressed button
    nAlign
    Alignment of text with respect to image in button
    textOrientation
    Orientation of text
    wordWrap
    Whether text wraps to multiple lines
    shadowSize
    Size of the shadow around the button
    darkColor
    Color of the shadow (dark part of button)
    lightColor
    Color of light part of button
    pictUp
    Picture (image) when button is not pressed
    pictDown
    Picture (image) when button is pressed
    bLocked
    Whether the cell is locked
    prefix
    Whether the ampersand character underlines text
    style
    Determines the button style
    mouseOver
    True if mouse is over button
    See Also