-   Programming (
-   -   ncurses background color (

gtanghookup 09-02-2003 07:02 PM

ncurses background color
I have been working on a project using ncurses for the past several months, and I am wondering how to keep the background a certain color. The background color of the initial screen will start off being a color that I would like it to be. However, once the text has reached its limit at the bottom of the screen the background color is lost. That is, once the text has filled the initial screen and begins to "scroll" downward, the background color of the text is correct, however the background color of the rest of the screen is the default terminal color. I would like to have the entire screen one uniform background color without having the end of each line to the end of the terminal be different. I am thinking most of the problem lies in the fact that the text scrolls instead of being stationary. I obviously do not know the solution, but I would think there would be a function within the library to solve this. I have spent much time looking and tried several different functions to remedy this. If you could help I would appreciate it very much.

jhorvath 09-02-2003 08:17 PM

have you tried something like :


#include <ncurses.h>

int main() {
    int i;

    /* this is my magic little line */

    for(i=0;i<2000;i++) {

    return 0;

hope that's what you meant

[NOTE] i changed some of it above because before it was too hard to tell if the screen was actually scrolling (hard to tell when you print the same character or string of i used an incrementing integer) it is definately visible [/NOTE]

All times are GMT -5. The time now is 10:32 PM.