bug-ncurses
[Top][All Lists]
Advanced

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

Re: Setting last character on screen (without scrolling enabled)


From: Thomas Dickey
Subject: Re: Setting last character on screen (without scrolling enabled)
Date: Thu, 07 Jun 2012 18:30:41 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

On Thu, Jun 07, 2012 at 10:04:53AM +0000, Michael Bohn wrote:
> Is there a workaround for this?  Is it possible to set a character at a
> position without moving the cursor or something like waddstr that moves the
> cursor to the left?

As a quick workaround, you can put a character (8-bits) into a chtype
and use addchstr (which does not move the cursor).  The wide-character
form add_wchstr requires setup of the data using setcchar.

Alternatively, you can use addch to write to the next-to-last cell the
character that you want to use in the last cell, then insert a character
into the next-to-last cell, e.g., with insch 

It sounds as if you are not programming in C, but using something that
has a binding - the binding may be incomplete (I'm curious).
 
> Regards,
> Michael
> ________________________________________
> From: Thomas Dickey address@hidden
> Sent: 07 June 2012 02:24
> To: Michael Bohn
> Cc: address@hidden
> Subject: Re: Setting last character on screen (without scrolling enabled)
> 
> On Wed, Jun 06, 2012 at 11:02:55AM +0000, Michael Bohn wrote:
> > Assume you have a NCurses Window (could be a subwindow) with dimensions ROWS
> > and COLS.  How do I set the character at ROWS-1 and COLS-1.  If I use 
> > waddstr
> > at this position with one character it doesn't work (throws a user
> > exception).  I assume this is because the cursor is moved to a position
> > outside the window?
> 
> either waddstr or waddch will write the character (and it will be displayed),
> but return an error because the wrap to the next line fails.
> 
> Solaris curses works like this; some programs rely on the behavior.
> 
> --
> Thomas E. Dickey <address@hidden>
> http://invisible-island.net
> ftp://invisible-island.net

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

Attachment: signature.asc
Description: Digital signature


reply via email to

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