HeaderPane
Main
Hide
Share Link
Print

SelectionStyleEnum Enumeration

Used with the SftTree.SelectionStyle property defining whether items or cells are selectable within the item area.

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

Syntax

public enum SelectionStyleEnum;
Public Enum SelectionStyleEnum

Values

NameDescription
SingleItemOnly one item can be selected at a time.
MultipleItemsMultiple discontiguous or contiguous items can be selected at the same time.
SingleCellOnly one cell can be selected at a time.
MultipleCellsMultiple discontiguous or contiguous cells can be selected at the same time.
BlockOfCellsMultiple contiguous cells in the shape of a rectangular block of cells can be selected at the same time.

Comments

Used with the SftTree.SelectionStyle property defining whether items or cells are selectable within the item area.

Examples

C#

        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() {

VB.NET

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 | Classes | SftTree/NET 3.0