Create a property type ' Tag' in the nodes of a TreeView  

Send By: Q3 Team
Web : http://www.q3.nu
Email: dlib@q3.nu
Date: 25/12/99

Tip accessed 553 times

 


In the nodes of a TreeView we don't have the aided property ' Tag', but we have the property it Date that is make in a principle to store a pointer toward something. To use it as if of a property Tag is, that is to say, an integer, enough with which we use typecasting:

Examples:

Put a 13 in the Data of the node of a TreeView:

       TreeView1.Items[1].Data:=Pointer(13);



That is to say, we make the typecasting Pointer(13) to convert our integer to a pointer.


To get the Data like a Integer:


 var
   Numero:integer;

 begin
   Numero:=Integer ( TreeView1.Items[1].Data );
 end;