SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
An instance of the CheckBoxPartClass class represents a checkbox part.
Cells can contain one or several checkboxes (instances of the CheckBoxPartClass). Each checkbox can operate independently with its own attributes and properties.
A checkbox can have a checked, unchecked or indeterminate state (CheckBoxStateEnum), but a user can only check or uncheck a checkbox. The indeterminate state can only be set by an application.
The Action event can be used to handle a checkbox click.
If the Action event is used, the CheckBoxClicked event and ItemClick event are not raised.
Namespace: Softelvdm.Controls
Assembly: Softelvdm.SftTreeNET
Inheritance
public class CheckBoxPartClass : Softelvdm.Controls.GenericPartClass;
Public Class CheckBoxPartClass Inherits Softelvdm.Controls.GenericPartClass
CheckBoxPartClass | Initializes a new instance of the CheckBoxPartClass class. |
Angle | Defines the rotation of the part. | |
Enabled | Defines whether the checkbox is enabled. | |
HAlign | Defines the horizontal alignment within the part's available space. | |
Orientation | Returns the orientation of parts within a cell. This is defined by the cell or the owner of the cell. | |
PartAlignment | Defines the part alignment of this part relative to its container and other parts. | |
PartOwner | Returns the owner of the part, usually an object derived from CellBaseClass. | |
State | Defines the checkbox state. | |
TagObject | Defines application-specific data. | |
TagString | Defines an application-specific string. | |
VAlign | Defines the vertical alignment within the part's available space. | |
VisibleAppearance | Returns the visibility status of the part. |
CalcRotatedSize | Calculates the size of the smallest rectangle that can contain the rotated rectangle of a given size, based on the part's GenericPartClass.Angle property. | |
CalcSize | Calculates the size of the part. | |
CalcUnrotatedBaseWidth | Calculates the actual width of the part, based on the width of the rotated part's containing rectangle. | |
ConsiderForOutline | Defines whether the part is considered when calculating the outline rectangle of a cell. | |
Copy | Creates an identical copy of the part. | |
CopyPart | Copies information from one part to another. | |
Equals | Determines whether the specified object is equal to the current object. | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. | |
GetHashCode | Serves as the default hash function. | |
GetType | Gets the Type of the current instance. | |
GetVisible | Returns the current visibility status of a part, based on the part's GenericPartClass.VisibleAppearance property. | |
MemberwiseClone | Creates a shallow copy of the current Object. | |
OnContentChanged | Called when the contents of the part changed. | |
ReferenceEquals | Determines whether the specified Object instances are the same instance. | |
StrategyRoutine | Used to perform various actions the part supports, like rendering the part, hit-testing, determining its position and responding to mouse button clicks. | |
ToString | Returns a string that represents the current object. |
Action | Occurs when a part's action is triggered by the user. |
ItemClass item = sftTree1.ItemCollection.Add(); // Add a text part to the first cell (could use CellBaseClass.Text instead) CellClass cell = item.Cells[0]; TextPartClass tp = new TextPartClass("The first cell", LineStyleEnum.Wordwrap, HAlignmentOptionalEnum.Left, VAlignmentOptionalEnum.Top, Color.Blue, Color.Green, Color.Red, Color.Blue, new Font("Arial", 12), StringFormatFlags.LineLimit| StringFormatFlags.MeasureTrailingSpaces); cell.Parts.Add(tp); // Followed by a check box (still in the first cell) CheckBoxPartClass cb = new CheckBoxPartClass( CheckBoxStateEnum.Unchecked, HAlignmentOptionalEnum.Left, VAlignmentOptionalEnum.Top, true); cb.Action += new GenericPartClass.ActionEventHandler(cb_Action); cell.Parts.Add(cb); // Followed by an image (still in the first cell) ImagePartClass ip = new ImagePartClass(img); cell.Parts.Add(ip); // Add contents to the second cell
Dim item As ItemClass = sftTree1.ItemCollection.Add() ' Add a text part to the first cell (could use CellBaseClass.Text instead) Dim cell As CellClass = item.Cells(0) Dim tp As TextPartClass = New TextPartClass("The first cell", LineStyleEnum.Wordwrap, HAlignmentOptionalEnum.Left, _ VAlignmentOptionalEnum.Top, Color.Blue, Color.Green, Color.Red, Color.Blue, New Font("Arial", 12), StringFormatFlags.LineLimit Or StringFormatFlags.MeasureTrailingSpaces) cell.Parts.Add(tp) ' Followed by a check box (still in the first cell) Dim cb As CheckBoxPartClass = New CheckBoxPartClass(CheckBoxStateEnum.Unchecked, HAlignmentOptionalEnum.Left, VAlignmentOptionalEnum.Top, True) AddHandler cb.Action, AddressOf cb_Action cell.Parts.Add(cb) ' Followed by an image (still in the first cell) Dim ip As ImagePartClass = New ImagePartClass(img) cell.Parts.Add(ip) ' Add contents to the second cell
See Also Classes | SftTree/NET 2.0