You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In curses one can change the attributes of a whole line (with num -1) with chgat.
I've a x amount of columns with text / icons in a filemanager like application. I want to highlight/ reverse the whole line of the cursor position. With curses I would use chgat. Is there similar functionality in tcell?
Set the attributes of num characters at the current cursor position, or at position (y, x) if supplied. If num is not given or is -1, the attribute will be set on all the characters to the end of the line. This function moves cursor to position (y, x) if supplied. The changed line will be touched using the touchline method so that the contents will be redisplayed by the next window refresh.
Issue reopened. Sure I could use textbar probably, but with chgat this is so simple to do. A textbar for each line seems to be a bit too much. Maybe I'm overlooking something or maybe something like chgat can be added to tcell if it doesn't exist yet.
I don't think adding this API to tcell (which is mostly focused with individual character cells) is a great idea.
Conversely, there are higher level APIs where this makes excellent sense. Are you using the views framework? Maybe that would be a good place to add it.
gdamore
changed the title
[question] equivalent of curses chgat
Change attributes of entire line
Nov 22, 2022
In curses one can change the attributes of a whole line (with num -1) with chgat.
I've a x amount of columns with text / icons in a filemanager like application. I want to highlight/ reverse the whole line of the cursor position. With curses I would use chgat. Is there similar functionality in tcell?
Edit: I'll try to use textbar from views.
https://tldp.org/HOWTO/NCURSES-Programming-HOWTO/attrib.html#CHGAT
Python curses:
window.chgat(y, x, num, attr)
https://docs.python.org/3/library/curses.html#module-curses
The text was updated successfully, but these errors were encountered: