Przesuwanie w TreeView

0

Jak przesunąć element o indeksie/nazwie 'x' na górę drzewa, klikając na przycisk [???]

0

Items.Exchange .. lub podobnie - wystarczyło F1. ehh

0

Exchange w TreeView? Jakoś nie widzę.

0

No to

<font color="brown">procedure MoveTo(Destination: TTreeNode; Mode: TNodeAttachMode);</span>

0

Heh, no o ty w zasadzie wiedziałem, gorzej z obsługą parametrów tej procedury.

0

x - index Itemu do ustawienia jako pierwszy.

TreeView1.Items[x].MoveTo(TreeView1.Items[x].Parent, naAddFirst);

Parametry masz opisane w Helpie:

<font color="brown">type TNodeAttachMode = (naAdd, naAddFirst, naAddChild, naAddChildFirst, naInsert);

Description

The TNodeAttachMode type specifies the way a new or relocated tree node will be related to some other node.

Value Meaning

naAdd The new or relocated node becomes the last sibling of the other node.
naAddFirst The new or relocated node becomes the first sibling of the other node.
naInsert The new or relocated node becomes the sibling immediately before the other node.
naAddChild The new or relocated node becomes the last child of the other node.
naAddChildFirst The new or relocated node becomes the first child of the other node.</span>

1 użytkowników online, w tym zalogowanych: 0, gości: 1