Recent

Author Topic: [SOLVED] Treeview: full-width background coloring of nodes ... easy?  (Read 6022 times)

d7_2_laz

  • Hero Member
  • *****
  • Posts: 631
Re: Treeview: full-width background coloring of nodes ... easy?
« Reply #45 on: February 19, 2025, 05:06:22 pm »
Crazy ..., and btw it shows up similarly if i start the project with 3.8 ...

Edit: it seems that's only an attribute of the display 'today' (= to show such lines lightgray, just as to be inactive). In fact i can set a breakpoint herein.
Never recognized such before. I remember it the other way round. Anyway, i'll try to start now.
« Last Edit: February 19, 2025, 05:24:05 pm by d7_2_laz »
Lazarus 3.8  FPC 3.2.2 Win10 64bit

wp

  • Hero Member
  • *****
  • Posts: 12772
Re: Treeview: full-width background coloring of nodes ... easy?
« Reply #46 on: February 19, 2025, 05:46:59 pm »
You mean that the code in the {IF} block is grayed? That's normal, Laz seems to have a problem with {$IF} (in contrast to {$IFDEF}). The code will be used although it is grayed.

d7_2_laz

  • Hero Member
  • *****
  • Posts: 631
Re: Treeview: full-width background coloring of nodes ... easy?
« Reply #47 on: February 19, 2025, 06:06:28 pm »
But with IFDEF it looks quite the same (see last image), i indeed remember it to be quite different.
Just rebuilt with a clean laz_conf (for to exclude a corrupted old config), but's the same.
Anyway, i'll ignore that now ...
Lazarus 3.8  FPC 3.2.2 Win10 64bit

d7_2_laz

  • Hero Member
  • *****
  • Posts: 631
Re: Treeview: full-width background coloring of nodes ... easy?
« Reply #48 on: February 19, 2025, 08:56:54 pm »
Sorry for the delay, i had many interruptions the last days.

1)Tried the demo in it's variaous combinations.
For representative candidates (for related items it repeats) there is. eg:

====== HideSelection/true, like_Laz:
Default (themed)                  - Selection: changes color (to gray)
Default (not themed)             - Selection: no color change           // coloring disappears if node gets disabled
RowSelect+hottrack (themed)      - Selection: changes color (to gray)
RowSelect+hottrack (fullline)        - Selection: no color change
.... (repeats:) ...
Background image (themed)         - Selection: changes color (to gray)
Background image (not themed)    - Selection: no color change
....

======= HideSelection/false, like_Laz:
Default (themed)                  - Selection: changes color (to gray)
Default (not themed)             - Selection: no color change
RowSelect+hottrack (themed)      - Selection: changes color (to gray)
RowSelect+hottrack (fullline)        - Selection: no color change
etc.

In so far it matches eyactly the approach you had described above, afais.

2) Check: regressions on extensive customdraw?
Tried with own demo, stand-alone app and NppPlugin - no contradicting effect found.

Cool  :)
« Last Edit: February 19, 2025, 10:27:22 pm by d7_2_laz »
Lazarus 3.8  FPC 3.2.2 Win10 64bit

 

TinyPortal © 2005-2018