Recent

Author Topic: [SOLVED] Treeview rootnode image  (Read 998 times)

pcurtis

  • Hero Member
  • *****
  • Posts: 951
[SOLVED] Treeview rootnode image
« on: April 18, 2022, 04:16:28 pm »
Why does the image of the rootnode vanish when the node is  selected?
« Last Edit: April 18, 2022, 05:48:09 pm by pcurtis »
Windows 10 20H2
Laz 2.2.0
FPC 3.2.2

dsiders

  • Hero Member
  • *****
  • Posts: 1635
Re: Treeview rootnode image
« Reply #1 on: April 18, 2022, 04:39:50 pm »
Why does the image of the rootnode vanish when the node is  selected?

If you're referring to the expand/collapse indicator, it does not disappear when selected using Windows 8.1. Must be another "improvement" made to Windows 10.

Do you have themed drawing enabled in the Options property? Does changing it have any effect?

pcurtis

  • Hero Member
  • *****
  • Posts: 951
Re: Treeview rootnode image
« Reply #2 on: April 18, 2022, 04:49:19 pm »
Not the icon but the image assigned by imageindex / imagelist

Themed draw has no effect
« Last Edit: April 18, 2022, 04:53:36 pm by pcurtis »
Windows 10 20H2
Laz 2.2.0
FPC 3.2.2

dsiders

  • Hero Member
  • *****
  • Posts: 1635
Re: Treeview rootnode image
« Reply #3 on: April 18, 2022, 05:25:53 pm »
Not the icon but the image assigned by imageindex / imagelist

Just checked. Works as expected (on Win 8.1) if the tree view item has Image, Selected, and optional State image indexes assigned. Project attached.

pcurtis

  • Hero Member
  • *****
  • Posts: 951
Re: Treeview rootnode image
« Reply #4 on: April 18, 2022, 05:46:51 pm »
Thanks. Solved it.
Forgot to set selectedimdex




























Windows 10 20H2
Laz 2.2.0
FPC 3.2.2

 

TinyPortal © 2005-2018