Page 1 of 1
Multicolor listbox item
Posted: Tue 19 Nov, 2019 14:53
by pepak
Within FAR itself (not in a plugin), is it possible to create a listbox with multicolor items? E.g. assume a listbox with three items:
I would like the number (1, 2 or 3) to use a different textcolor than the "item" prefix. The coloring should not have any side-effects, so using an & to "highlight" the number is out. But I am OK with just two colors, I don't need a fully generic solution. It seems to me that if I were writing a plugin, I could make use of DN_DRAWDLGITEM (and in FAR, presumably I could use the functions that get called when DN_DRAWDLGITEM is used - I didn't research which ones are these, yet), but I am not really at all certain. Can anyone confirm whether I am on the right track, please? Thanks.
Multicolor listbox item
Posted: Tue 19 Nov, 2019 15:18
by zg
Multicolor listbox item
Posted: Tue 19 Nov, 2019 17:17
by pepak
Hmm. Are you sure? LuaFarHistory achieves these multicolor items somehow, so it should be possible. Particularly since I am not limited by LuaMacro or the plugin interface, I can modify FAR's source code directly.
Multicolor listbox item
Posted: Tue 19 Nov, 2019 17:30
by buniak_a_h
pepak wrote: ↑Tue 19 Nov, 2019 17:17
LuaFarHistory achieves these multicolor items somehow
Where??? I didn't see…
Multicolor listbox item
Posted: Tue 19 Nov, 2019 18:53
by pepak
Activate the history and start searching (by pressing the regular keys).
Multicolor listbox item
Posted: Tue 19 Nov, 2019 19:12
by zg
this is
custom implementation based on DI_USERCONTROL.
Multicolor listbox item
Posted: Tue 19 Nov, 2019 19:36
by pepak
That's not good news at all. I still hope you are mistaken, but I am afraid you aren't. :-(