help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Row colors based on their object values in vtable


From: ijqq
Subject: Row colors based on their object values in vtable
Date: Tue, 26 Mar 2024 20:30:11 +0000

Hello,

I am trying to a simple interface using the vtable package. I would like the 
background colour of each row to depend on the value of its underlying object 
(e.g. the row should have a green background if the foo​ field of the object it 
represents is 1, otherwise it should have a plain white background). I am a 
beginner in emacs-lisp and am wondering what the best way to do this is.

The :displayer parameter to the vtable​ takes the formatted string of the text 
only so it wouldn't affect the background for the whole row. The :row-colors 
parameter takes a list and not a function, so I'm a bit stuck on updating it 
properly. I tried to set :row-colors to be the value of a global variable which 
is set by my :objects-function function, but now when updating the table, the 
colours become out of sync.

Thank you

reply via email to

[Prev in Thread] Current Thread [Next in Thread]