[]
Calculates the height and width required to display the button text and picture.
public static Size GetPreferredSize(Graphics g, Size size, Font font, string text, string textDown, ButtonTextAlign nAlign, bool wordWrap, int shadowSize, Image pictUp, Image pictDown)
Public Shared Function GetPreferredSize(g As Graphics, size As Size, font As Font, text As String, textDown As String, nAlign As ButtonTextAlign, wordWrap As Boolean, shadowSize As Integer, pictUp As Image, pictDown As Image) As Size
Type | Name | Description |
---|---|---|
Graphics | g | GDI+ graphics surface |
Size | size | Size |
Font | font | Font |
string | text | Text of button when not pressed |
string | textDown | Text of button when pressed |
ButtonTextAlign | nAlign | Alignment of text |
bool | wordWrap | Whether text wraps to multiple lines |
int | shadowSize | Size of shadow around button |
Image | pictUp | Picture (image) when button is not pressed |
Image | pictDown | Picture (image) when button is pressed |
Type | Description |
---|---|
Size |
Calculates the height and width required to display the button text and picture.
public static Size GetPreferredSize(Graphics g, Size size, Font font, string text, string textDown, ButtonTextAlign nAlign, TextOrientation textOrientation, bool wordWrap, int shadowSize, Image pictUp, Image pictDown, HotkeyPrefix prefix)
Public Shared Function GetPreferredSize(g As Graphics, size As Size, font As Font, text As String, textDown As String, nAlign As ButtonTextAlign, textOrientation As TextOrientation, wordWrap As Boolean, shadowSize As Integer, pictUp As Image, pictDown As Image, prefix As HotkeyPrefix) As Size
Type | Name | Description |
---|---|---|
Graphics | g | GDI+ graphics surface |
Size | size | Size |
Font | font | Font |
string | text | Text of button when not pressed |
string | textDown | Text of button when pressed |
ButtonTextAlign | nAlign | Alignment of text |
TextOrientation | textOrientation | Text orientation |
bool | wordWrap | Whether text wraps to multiple lines |
int | shadowSize | Size of shadow around button |
Image | pictUp | Picture when button is not pressed |
Image | pictDown | Picture when button is pressed |
HotkeyPrefix | prefix | Hotkey prefix |
Type | Description |
---|---|
Size |
Calculates the height and width required to display the button text and picture.
public static Size GetPreferredSize(Graphics g, Size size, Font font, string text, string textDown, ButtonTextAlign nAlign, TextOrientation textOrientation, bool wordWrap, int shadowSize, Image pictUp, Image pictDown, HotkeyPrefix prefix, double angle)
Public Shared Function GetPreferredSize(g As Graphics, size As Size, font As Font, text As String, textDown As String, nAlign As ButtonTextAlign, textOrientation As TextOrientation, wordWrap As Boolean, shadowSize As Integer, pictUp As Image, pictDown As Image, prefix As HotkeyPrefix, angle As Double) As Size
Type | Name | Description |
---|---|---|
Graphics | g | GDI+ graphics surface |
Size | size | Size |
Font | font | Font |
string | text | Text of button when not pressed |
string | textDown | Text of button when pressed |
ButtonTextAlign | nAlign | Alignment of text |
TextOrientation | textOrientation | Text orientation |
bool | wordWrap | Whether text wraps to multiple lines |
int | shadowSize | Size of shadow around button |
Image | pictUp | Picture when button is not pressed |
Image | pictDown | Picture when button is pressed |
HotkeyPrefix | prefix | HotkeyPrefix |
double | angle | The text rotation angle. |
Type | Description |
---|---|
Size |
Calculates the height and width required to display the button text and picture.
public static Size GetPreferredSize(FpButtonPaintArgs args)
Public Shared Function GetPreferredSize(args As FpButtonPaintArgs) As Size
Type | Name | Description |
---|---|---|
FpButtonPaintArgs | args | The arguments for getting preferred size. NOTE: Just listed arguments here affect to the result args.g, args.r.Size, args.font, args.text, args.textDown, args.nAlign, args.halign, args.valign, args.textOrientation, args.wordWrap, args.shadowSize, args.pictUp, args.pictDown, args.prefix, args.txtRotationAngle, args.rightToLeft, args.pressed, args.getPreferredSizeDirection |
Type | Description |
---|---|
Size |