bug-ncurses
[Top][All Lists]
Advanced

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

RE: Possible problem with wchgat???


From: Cy
Subject: RE: Possible problem with wchgat???
Date: Tue, 22 Jan 2002 22:05:05 -0600

Well, I guess I can reply to this myself.

        "Leland, you're being stupid so shut up!"

It seems that wchgat only does a SetAttr (ORs the new attribs) and never
actually "touches" the window line, so the wrefresh() doesn't know it
needs to update anything.  Adding:

    wtouchln( wstat, 5, 1, TRUE );

Fixed the problem.

Sorry for the intrusion...

Leland

> -----Original Message-----
> From:
> [mailto:address@hidden On Behalf Of Cy
> Sent: Tuesday, January 22, 2002 9:13 PM
> To: address@hidden
> Subject: RE: Possible problem with wchgat???
> 
> 
> I should mention that this is with the corrected mvwchgat
> define. (replace stdscr with win)
> 
> > -----Original Message-----
> > From: address@hidden [mailto:address@hidden 
> > On Behalf Of Cy
> > Sent: Tuesday, January 22, 2002 8:35 PM
> > To: address@hidden
> > Subject: Possible problem with wchgat???
> > 
> > 
> > Okay, remember that I'm new to this here cursing (err, curses), so 
> > if I'm wrong here, just tell me so and I'll
> shut up.  b-)
> > 
> > In the sample below, I expected the color of the "A" at 5x5 to 
> > change to YELLOW on RED.  Try as I might, I just can't get it to 
> > happen.  Here's the example code:
> > 
> > #include <curses.h>
> > 
> > int
> > main( int argc, char *argv[] )
> > {
> >     WINDOW *wstat;
> > 
> >     initscr();
> >     start_color();
> >     noecho();
> >     init_pair( 1, COLOR_YELLOW, COLOR_BLUE );
> >     init_pair( 2, COLOR_YELLOW, COLOR_RED );
> > 
> >     wstat = newwin( 0, 0, 0, 0 );
> > 
> >     mvwaddch( wstat, 5, 5, 'A' | A_BOLD | COLOR_PAIR( 1 ) );
> >     mvwaddch( wstat, 9, 9, 'Z' | A_BOLD | COLOR_PAIR( 2 ) );
> >     wrefresh( wstat );
> >     mvwgetch( wstat, 7, 7 );
> > 
> >     mvwchgat( wstat, 5, 5, 1, A_BOLD, 2, NULL );
> >     wrefresh( wstat );
> >     mvwgetch( wstat, 7, 7 );
> > 
> >     delwin( wstat );
> >     endwin();
> > 
> >     return 0;
> > }
> > 
> > Critter or just me being stupid???
> > 
> > Leland
> > 
> > 
> > _______________________________________________
> > Bug-ncurses mailing list
> > address@hidden http://mail.gnu.org/mailman/listinfo/bug-ncurses
> > 
> 
> 
> _______________________________________________
> Bug-ncurses mailing list
> address@hidden http://mail.gnu.org/mailman/listinfo/bug-ncurses
> 




reply via email to

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