Visual Basic (Declaration) | |
---|---|
Public Overridable Property Picture As CheckBoxPicture |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As FpCheckBox Dim value As CheckBoxPicture instance.Picture = value value = instance.Picture |
C# | |
---|---|
public virtual CheckBoxPicture Picture {get; set;} |
Property Value
CheckBoxPicture object containing the pictureIf you prefer, you can use your own custom pictures for any or all of the pictures that represent the check box states. Provide the picture as a CheckBoxPicture object. The CheckBoxPicture object lets you specify different pictures for the different check box states.
Check boxes can also display background pictures. Set the BackgroundImage property to specify the background picture.
Specify the alignment for the check box picture and text using the PictureAlignH and PictureAlignV properties.
Specify how the text and the check box picture are aligned using the TextAlign property.
Set the ThreeState property to specify whether the check box has two or three states.
This property is available at run time only.
Tip: When using custom pictures to represent states, try to create a consistent look and feel for the check box cell. Also, be aware of common interface conventions used to represent states, such as using lighter shades of text or graphics to represent the grayed (indeterminate) state. |
C# | Copy Code |
---|---|
control.ThreeState = true; control.Checked = false; control.Picture[1] = Image.FromFile("..\\check1.bmp"); |
Visual Basic | Copy Code |
---|---|
control.ThreeState = True control.Checked = False control.Picture(1) = Image.FromFile("..\check1.bmp") |
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2