GetPreferredSize(Graphics,Size,Object,Font,String,String,String,String,CheckBoxPicture,ButtonTextAlign,Boolean,Boolean,HotkeyPrefix) Method
In This Topic
Calculates the height and width to display the text and picture in the check box.
Syntax
'Declaration
Public Overloads Shared Function GetPreferredSize( _
ByVal As Graphics, _
ByVal As Size, _
ByVal As Object, _
ByVal As Font, _
ByVal As String, _
ByVal As String, _
ByVal As String, _
ByVal As String, _
ByVal As CheckBoxPicture, _
ByVal As ButtonTextAlign, _
ByVal As Boolean, _
ByVal As Boolean, _
ByVal As HotkeyPrefix _
) As Size
'Usage
Dim g As Graphics
Dim size As Size
Dim value As Object
Dim f As Font
Dim textTrue As String
Dim textFalse As String
Dim textGray As String
Dim caption As String
Dim pict As CheckBoxPicture
Dim align As ButtonTextAlign
Dim bKeyDown As Boolean
Dim bMouseDown As Boolean
Dim prefix As HotkeyPrefix
Dim value As Size
value = FpCheckBox.GetPreferredSize(g, size, value, f, textTrue, textFalse, textGray, caption, pict, align, bKeyDown, bMouseDown, prefix)
public static Size GetPreferredSize(
Graphics ,
Size ,
object ,
Font ,
string ,
string ,
string ,
string ,
CheckBoxPicture ,
ButtonTextAlign ,
bool ,
bool ,
HotkeyPrefix
)
Parameters
- g
- Graphics device interface for drawing; GDI+ graphics surface
- size
- Preferred or maximum needed size
- value
- CheckState constant specifying the check box state, or null (or non-CheckState value) to use as the current state of the check box
- f
- Font for computing the height and width
- textTrue
- String of text when the check box is checked (true)
- textFalse
- String of text when the check box is unchecked (false)
- textGray
- String of text when the check box is gray (indeterminate)
- caption
- String of text if none of the other text values are set
- pict
- Picture (image) for the check box
- align
- Alignment of the text and check box
- bKeyDown
- Whether the key down
- bMouseDown
- Whether the mouse down
- prefix
- Hotkey prefix
See Also