TIP: Click on subject to list as thread! ANSI
echo: delphi
to: TOPOROV EUGENE
from: MARTIN MAAT
date: 1997-05-21 20:18:00
subject: How to get an index of selected TreeView20:18:2605/21/97

Hallo Toporov
 TE>  I guess it's SO easy that i just cant see it!
 TE>  Anyway, could someone tell me Subj?
"Selected" something, look it up in on line help! There's an event (OnChange 
or something like it) which gives you the selected node as a parameter. Using 
that, as soon as a node is selected, you can have your way with it without 
knowing the index.
 TE> I managed to do it with OutLine (OutLine.SelectedItem) but TreeView
 TE> looks more pritty:-)
It not only looks "more pritty", it is totally different. TOutline is much 
like a flat list, TOutline.Items is a TStringList. In a TTreeView, every node 
is an object in it's own right, holding it's own sub-nodes. Being familliar 
with TOutline can be a handicap when first utilising TTreeView, especially 
because many methods and properties have the same name in both classes and 
you will _think_ you know what they do!
Groeten, Martin.
--- FMail/386 1.02
---------------
* Origin: -=[ E-mail: m_maat@knoware.nl .......... ]=- (2:286/420.1)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.