From: ijqq via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Row colors based on their object values in vtable
Date: Tue, 26 Mar 2024 20:30:11 +0000 [thread overview]
Message-ID: <NV0yKLx6AUtwPvewsyU0LZwJigyWoA4A6UBipaVj1sXgCbtEZI6sjhaMj12Y7QFGAUWw_B5xLs6EPD31Uf1-vzzrFh2HmnsqSDS0SuPnXlg=@protonmail.com> (raw)
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 other threads:[~2024-03-26 20:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='NV0yKLx6AUtwPvewsyU0LZwJigyWoA4A6UBipaVj1sXgCbtEZI6sjhaMj12Y7QFGAUWw_B5xLs6EPD31Uf1-vzzrFh2HmnsqSDS0SuPnXlg=@protonmail.com' \
--to=help-gnu-emacs@gnu.org \
--cc=ijqq@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).