HeaderPane
Main
Hide
Share Link
Print

UsageLocationEnum Enumeration

Used to define in which area of the control the cell or item is used.

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

Syntax

public enum UsageLocationEnum;
Public Enum UsageLocationEnum

Values

NameDescription
itemsThe cell or item is used in the item area.
headerThe cell or item is used in the header area.
footerThe cell or item is used in the footer area.

Comments

Used to define in which area of the control the cell or item is used.

Examples

C#

        private void sftTree1_ColumnResized(object sender, Softelvdm.SftTreeNET.ColumnResizedEventArgs e) {
            DumpValues("ColumnResized", e);
        }

        private void sftTree1_DragDetected(object sender, Softelvdm.SftTreeNET.DragDetectedEventArgs e) {
            DumpValues("DragDetected", e);

            if (e.Item.UsageLocation != UsageLocationEnum.items)
                return; // ignore header/footer dragging

            e.Handled = true;
            sftTree1.DoDragDrop("In this example, we are dragging a simple text string", DragDropEffects.Copy);
        }

        private void sftTree1_DragDrop(object sender, DragEventArgs e) {
            DumpValues("DragDrop", e);

VB.NET

Private Sub SftTree1_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SftTree1.DoubleClick
 DumpValues("DoubleClick", e)
End Sub

Private Sub SftTree1_DragDetected(ByVal sender As System.Object, ByVal e As Softelvdm.SftTreeNET.DragDetectedEventArgs) Handles SftTree1.DragDetected
    DumpValues("DragDetected", e)

    If e.Item.UsageLocation <> UsageLocationEnum.items Then
        Return ' ignore header/footer dragging
    End If

    e.Handled = True
    SftTree1.DoDragDrop("In this example, we are dragging a simple text string", DragDropEffects.Copy)
End Sub

Private Sub SftTree1_DragDrop(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles SftTree1.DragDrop

See Also | Classes | SftTree/NET 3.0