Spread Windows Forms 17
FarPoint.Win Assembly / FarPoint.Win Namespace / FpMultiOption Class / GetPreferredSize Method / GetPreferredSize(Graphics,Font,ButtonTextAlign,RadioOrientation,RadioPicture,ArrayList) Method
GDI+ graphics surface
Font
Alignment of text
Orientation (vertical or horizontal) of list of option buttons
Picture (image) for the option buttons
Array of list of options


In This Topic
    GetPreferredSize(Graphics,Font,ButtonTextAlign,RadioOrientation,RadioPicture,ArrayList) Method
    In This Topic
    Calculates the height and width required to display the text and picture (of the option buttons) in the control with default width and height.
    Syntax
    'Declaration
     
    
    Public Overloads Shared Function GetPreferredSize( _
       ByVal g As Graphics, _
       ByVal font As Font, _
       ByVal nAlign As ButtonTextAlign, _
       ByVal nOrientation As RadioOrientation, _
       ByVal radioPicture As RadioPicture, _
       ByVal radioList As ArrayList _
    ) As Size
    'Usage
     
    
    Dim g As Graphics
    Dim font As Font
    Dim nAlign As ButtonTextAlign
    Dim nOrientation As RadioOrientation
    Dim radioPicture As RadioPicture
    Dim radioList As ArrayList
    Dim value As Size
     
    value = FpMultiOption.GetPreferredSize(g, font, nAlign, nOrientation, radioPicture, radioList)

    Parameters

    g
    GDI+ graphics surface
    font
    Font
    nAlign
    Alignment of text
    nOrientation
    Orientation (vertical or horizontal) of list of option buttons
    radioPicture
    Picture (image) for the option buttons
    radioList
    Array of list of options
    See Also