Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Down

TTreeView and TListView Find similar branches


$Hic0   (2001-12-16 11:49) [0]

Can anyone have a clever example of how to work with these components, how to link them, how to transfer data from one to another on the OnChange event :) If there is, it would be nice :)
Thanks in advance



SergeyVP   (2001-12-19 06:11) [1]

I did something like this

for Tree.OnChange:
------
List.Items.Clear; for i: = 0 to Tree.Selected.Count-1 do begin ListItem: = List.Items.Add; ListItem.Caption: = Tree.Selected.Item [i] .Text; ListItem.ImageIndex: = Tree.Selected.Item [i] .ImageIndex; end;
---------

for List.OnChange:
---------
Tree.Selected.Item [List.Selected.Index] .Selected: = true;
----------

It turned out when selecting an item in the Tree, the list of child nodes was loaded into the List, and when selected, the selected one was selected in the List.
What is not clear - ask.



Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Top





Memory: 0.54 MB
Time: 0.031 c
1-22173
Petyun
2001-12-20 19:33
2002.01.08
Component installation


1-22156
vlv
2001-12-15 21:05
2002.01.08
HTMLHelp


6-22285
Vital
2001-10-09 12:34
2002.01.08
The problem of choice


14-22325
Olgerd
2001-11-04 19:05
2002.01.08
Distribution


6-22300
evgen_2001
2001-10-04 12:25
2002.01.08
Sending messages





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian Japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Spanish swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada Khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish