From the Python docs and howto pages it's clear how to color text: by first adding strings to a window and then using chgat() to assign a color-pair to the desired characters in that window.

What isn't clear to me is how to change the color of a box or border, which are made visible using box() or border(). Edit: using chgat() on the whole window does not seem to affect that window's border.

有帮助吗?

解决方案

Well, that's one way to color text, but generally not the best way. I'd suggest, instead, using attrset(), and then adding strings or borders. The border and text should then both be affected, and it's less overhead.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top