Spread Windows Forms 7.0 Product Documentation
GetPreferredSize(Graphics,Font,ButtonTextAlign,RadioOrientation,RadioPicture,ArrayList,Int32,Int32) Method
See Also  Support Options
FarPoint.Win Assembly > FarPoint.Win Namespace > FpMultiOption Class > GetPreferredSize Method : GetPreferredSize(Graphics,Font,ButtonTextAlign,RadioOrientation,RadioPicture,ArrayList,Int32,Int32) Method


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
pictWidth
Width of picture for the option buttons
pictHeight
Height of picture for the option buttons

Glossary Item Box

Calculates the height and width required to display the text and picture (of the option buttons) in the control.

Syntax

Visual Basic (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, _
   ByVal pictWidth As Integer, _
   ByVal pictHeight As Integer _
) As Size
Visual Basic (Usage)Copy Code
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 pictWidth As Integer
Dim pictHeight As Integer
Dim value As Size
 
value = FpMultiOption.GetPreferredSize(g, font, nAlign, nOrientation, radioPicture, radioList, pictWidth, pictHeight)
C# 
public static Size GetPreferredSize( 
   Graphics g,
   Font font,
   ButtonTextAlign nAlign,
   RadioOrientation nOrientation,
   RadioPicture radioPicture,
   ArrayList radioList,
   int pictWidth,
   int pictHeight
)

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
pictWidth
Width of picture for the option buttons
pictHeight
Height of picture for the option buttons

Return Value

Size object containing the size of the control

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.