TtreeView and images lazarus / 31-LCL ---------------------------------------------------------------------- BlueIcaro · 2010-08-17 13:40 Hello, When I add some elements to my TTreeView, in design time I can select the image for the element, the image when this element is selected, and the image for state. But When I add a element in runtime, I can select a image for this element, for example: Quote NodeImageIndex:=1 But I don't find any property to select for the other images, selected image, state image. I use Lazarus 0.9.28.3 Svn:26768 in windows XP Thanks /BlueIcaro ---------------------------------------------------------------------- alejol0 · 2010-08-17 18:40 First, put some ImageList controls in your form and fill them with icons. At design time, you can attach the TreeView to an ImageList for storing node images:   TreeView1.StateImages :=ImageList1   TreeView1.Images :=ImageList1 (set this using Object Inspector) Then, in runtime, you can assign and change node images changing the index: Code: [Select]      NewNode:=TreeView1.Items.Add(Nil, Edit1.Text );       NewNode.ImageIndex :=0;       NewNode.SelectedIndex :=1;       NewNode.StateIndex :=2; Hope this helps. -- alejandro.lavarello (at) gmail (dot) com ---------------------------------------------------------------------- BlueIcaro · 2010-08-17 19:50 Thank you for the information. It was veru usefull /BlueIcaro