Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

RadioButtonClicked Event, SftTree Class

Occurs when a radiobutton part (RadioButtonPartClass) is clicked.

Class: SftTree
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public event RadioButtonEventHandler RadioButtonClicked;
Public Event RadioButtonClicked As RadioButtonEventHandler

Comments

Occurs when a radiobutton part (RadioButtonPartClass) is clicked.

Examples

C#

                        // changing the checkbox state doesn't automatically call the CheckBoxClicked event
                        CellClass owningCell = (CellClass)cb.PartOwner;
                        ItemClass owningItem = owningCell.OwningItem;
                        sftTree1_CheckBoxClicked(this, new PartEventArgs(owningItem, owningCell, null, cb));
                    } else if (gp is RadioButtonPartClass) {
                        RadioButtonPartClass rb = (RadioButtonPartClass)gp;
                        if (sftTree1.PerformClick_RadioButtonPart(rb)) {
                            e.Handled = true;
                            // changing the radiobutton state doesn't automatically call the RadioButtonClicked event
                            CellClass owningCell = (CellClass) rb.PartOwner;
                            ItemClass owningItem = owningCell.OwningItem;
                            sftTree1_RadioButtonClicked(this, new PartEventArgs(owningItem, owningCell, null, rb));
                        }
                    }
                }
            }

VB.NET

                ' changing the checkbox state doesn't automatically call the CheckBoxClicked event
                Dim owningCell As CellClass = cb.PartOwner
                Dim owningItem As ItemClass = owningCell.OwningItem
                SftTree1_CheckBoxClicked(Me, New PartEventArgs(owningItem, owningCell, Nothing, cb))
            ElseIf TypeOf gp Is RadioButtonPartClass Then
                Dim rb As RadioButtonPartClass = gp
                If SftTree1.PerformClick_RadioButtonPart(rb) Then
                    e.Handled = True
                    ' changing the radiobutton state doesn't automatically call the RadioButtonClicked event
                    Dim owningCell As CellClass = rb.PartOwner
                    Dim owningItem As ItemClass = owningCell.OwningItem
                    SftTree1_RadioButtonClicked(Me, New PartEventArgs(owningItem, owningCell, Nothing, rb))
                End If
            End If
        End If
    End If

See Also SftTree Class | Classes | SftTree/NET 2.0