Defines whether this item is selected.
Class: ItemClass
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET
public bool Selected { get; set; }
Public Property Selected As BooleanTrue if selected, otherwise False.
Defines whether this item is selected.
The Selected property is only available if the SftTree.SelectionStyle property allows item selection (SelectionStyleEnum.SingleItem, SelectionStyleEnum.MultipleItems). It cannot be used if cell selection (SelectionStyleEnum.SingleCell, SelectionStyleEnum.MultipleCells, SelectionStyleEnum.BlockOfCells) is in effect.
When an item is selected, the SelectionChanged event occurs.
private void ExpandCollapseButtonsNormal() {
sftTree1.ButtonLook = ButtonLookEnum.ThemedSystem;
sftTree1.TreeLinesPen = LinesPenStyleEnum.Solid;
sftTree1.TreeLineStyle = TreeLineStyleEnum.AllLevels;
}
private void SelectOneItem() {
sftTree1.SelectionStyle = SelectionStyleEnum.SingleItem;
sftTree1.ItemCollection[0].Children[0].Selected = true;
}
private void SelectItems() {
sftTree1.SelectionStyle = SelectionStyleEnum.MultipleItems;
sftTree1.ItemCollection[0].Children[0].Selected = true;
sftTree1.ItemCollection[0].Children[0].Children[0].Selected = true;
}
private void SelectOneCell() {
Private Sub ExpandCollapseButtonsNormal()
sftTree1.ButtonLook = ButtonLookEnum.ThemedSystem
sftTree1.TreeLinesPen = LinesPenStyleEnum.Solid
sftTree1.TreeLineStyle = TreeLineStyleEnum.AllLevels
End Sub
Private Sub SelectOneItem()
sftTree1.SelectionStyle = SelectionStyleEnum.SingleItem
sftTree1.ItemCollection(0).Children(0).Selected = True
End Sub
Private Sub SelectItems()
sftTree1.SelectionStyle = SelectionStyleEnum.MultipleItems
sftTree1.ItemCollection(0).Children(0).Selected = True
sftTree1.ItemCollection(0).Children(0).Children(0).Selected = True
End Sub
Private Sub SelectOneCell()See Also ItemClass Class | Classes | SftTree/NET 3.0