Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

RadioButtonStateEnum Enumeration

Defines the state of a radiobutton.

Class: (none)
Namespace: Softelvdm.Controls
Assembly: Softelvdm.SftTreeNET

Syntax

public enum RadioButtonStateEnum;
Public Enum RadioButtonStateEnum

Values

NameDescription
UncheckedThe radiobutton is not selected.
CheckedThe radiobutton is selected.

Comments

Defines the state of a radiobutton.

Examples

C#

            // Add an item
            ItemClass item = sftTree1.ItemCollection.Add();
            CellClass cell = item.Cells[0];
            item.Image = img;
            cell.Text = "Category 1";
            // Add some sub items
            ItemClass subItem = item.Add();
            RadioButtonPartClass rb = new RadioButtonPartClass(RadioButtonStateEnum.Checked);
            subItem.Cells[0].Parts.Add(rb);
            subItem.Cells[0].Parts.Add(new CheckBoxPartClass());
            subItem.Cells[0].Parts.Add(new TextPartClass("Item 1"));
            subItem = item.Add();
            rb = new RadioButtonPartClass(RadioButtonStateEnum.Unchecked);
            subItem.Cells[0].Parts.Add(rb);
            subItem.Cells[0].Parts.Add(new TextPartClass("Item 2"));
            subItem = item.Add();

VB.NET

    ' Add an item
    Dim item As ItemClass = sftTree1.ItemCollection.Add()
    Dim cell As CellClass = item.Cells(0)
    item.Image = img
    cell.Text = "Category 1"
    ' Add some sub items
    Dim subItem As ItemClass = item.Add()
    Dim rb As RadioButtonPartClass = New RadioButtonPartClass(RadioButtonStateEnum.Checked)
    subItem.Cells(0).Parts.Add(rb)
    subItem.Cells(0).Parts.Add(New CheckBoxPartClass())
    subItem.Cells(0).Parts.Add(New TextPartClass("Item 1"))
    subItem = item.Add()
    rb = New RadioButtonPartClass(RadioButtonStateEnum.Unchecked)
    subItem.Cells(0).Parts.Add(rb)
    subItem.Cells(0).Parts.Add(New TextPartClass("Item 2"))
    subItem = item.Add()

See Also | Classes | SftTree/NET 2.0



Spring Break!

Our offices will be closed this week (March 18 through March 22).

We'll be back March 24 to address any pending sales and support issues.