bug-ncurses
[Top][All Lists]
Advanced

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

Re: reverse video


From: Thomas Dickey
Subject: Re: reverse video
Date: Fri, 7 Mar 2003 15:21:15 -0500
User-agent: Mutt/1.2.5i

On Fri, Mar 07, 2003 at 11:52:57AM -0800, Peter Jay Salzman wrote:
> hi all,
> 
> i'd like to use reverse video -- black text on a white background.  i've
> tried to paint the screen white this way:
> 
> 
>    void Paint_Screen(void)
>    {
>       init_pair(COLOR_WHITE, COLOR_WHITE, COLOR_BLACK);
the first parameter isn't a color:
        init_pair(7, COLOR_WHITE, COLOR_BLACK);

>       attron(COLOR_PAIR(COLOR_WHITE));
>    
>       for (int i=0; i<COLS; ++i)
>          for (int j=0; j<LINES; ++j)
>             mvprintw(i, j, " ");
>       attron(0);
>    }
> 
> 
> and then printing text with this:
> 
> 
>    init_pair(COLOR_BLACK,   COLOR_BLACK,   COLOR_WHITE);
               is "0", which cannot be set.

>    attron(COLOR_PAIR(COLOR_BLACK));
                       ^^^^^^^^^^^ (not a color: "0" means default colors)

>    mvprintw(0, 0, "testing one two three");
> 
> 
> but i still get white text on black screen.  i also tried playing around
> with attron(A_REVERSE) but nothing seems to work.

that should work - more context is needed...

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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