[]
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 | An ordered pair of type Size representing the width and height. |
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 | An ordered pair of type Size representing the width and height. |
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 | An ordered pair of type Size representing the width and height. |