Autor Beitrag
stOrM!
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Mi 16.01.08 11:45 
Ich hab folgendes Problem, ich mal erstmal das Tree:

[-] Boss
|----Eintrag1
|----Eintrag2
|----Eintrag3
[-] Depp
|----Eintrag1
|----Eintrag2
|----Eintrag3

So, daß Problem was ich nun habe ist, wie kann ich feststellen welches der Hauptknoten eines Unterknotens ist? (Ohje... Beispiel:)

Jemand klickt z.B. auf Eintrag2 wie könnte ich jetzt feststellen, ob Eintrag2 sich in dem Hauptknoten Boss oder Depp befindet und dies in einen String wegschreiben?

Also klick auf Boss\Eintrag2 = String Boss, klick auf Depp\Eintrag3 = String Depp...

vielen dank
s!
Kroko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1284

W98 W2k WXP
Turbo D
BeitragVerfasst: Mi 16.01.08 14:21 
Stichworte zumindestens für TTreeView:

TTreeNode.HasAsParent
.HasChildren
.Level

_________________
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden! oder Wer lesen kann, ist klar im Vorteil!
stOrM! Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Mi 16.01.08 16:23 
user profile iconKroko hat folgendes geschrieben:
Stichworte zumindestens für TTreeView:

TTreeNode.HasAsParent
.HasChildren
.Level


Yo das ist ja das Problem gibt es bei VST so nicht.
Deswegen nützen mir Beispiele zum normalen Treeview wenig.

Grüsse
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 16.01.08 16:29 
Aber beim VST gibt es etwas wie Node.ParentNode, oder VST.GetParentNode(aChildNode). Irgendsowas in der Richtung gabs da...

_________________
We are, we were and will not be.
stOrM! Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Mi 16.01.08 18:29 
user profile iconGausi hat folgendes geschrieben:
Aber beim VST gibt es etwas wie Node.ParentNode, oder VST.GetParentNode(aChildNode). Irgendsowas in der Richtung gabs da...


Korrekt!!!
Ich schaus mir nachher mal an, danke für den Denkanstoß:-)

Ich bekomms doch nicht hin, egal ob ich rootnode oder level oder child verwende.
Teilweise bekomme ich sogar exceptions.

Ich brauch mal ein kleines Codebeispiel...