bug-ncurses
[Top][All Lists]
Advanced

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

Re: keeping text within a *WINDOW


From: John Bleichert
Subject: Re: keeping text within a *WINDOW
Date: Tue, 11 Jun 2002 11:18:06 -0400 (EDT)

On Tue, 11 Jun 2002, Thomas Dickey wrote:
> > Greetings - is there any ncurses-defined way to keep a cursor within a 
> > *WINDOW (i.e. get it to 'wrap' at a rightmost boundary)? Write now I'm 
> > doing it with a getparyx/getch combination but I'm curious if there's 
> > another way.
> 
> man addch:
> 
>        The  addch,  waddch, mvaddch and mvwaddch routines put the
>        character ch into the given window at its  current  window
>        position,  which  is then advanced.  They are analogous to
>        putchar in stdio(3).  If the advance is at the right  mar-
>        gin,  the  cursor  automatically wraps to the beginning of
>        the next line.  At the bottom  of  the  current  scrolling
>        region,  if  scrollok  is enabled, the scrolling region is
>        scrolled up one line.
> 
> > 

Right - I got that. What I have is a text entry window in an application, 
sort of like the text entry field in an IRC client. I made it 2 lines 
deep, and I was wondering if there was a way to force the user's cursor to 
'wrap' at the right-most margin of a text-entry field.

I've gotten it working manually by getch each keystroke, not echoing it, 
then addch'ing it to the text entry field (and also a different way), I am 
just curious if there's a way - perhaps I need to use a form or make my 
own text-entry widget ;-)

/* 
 * John Bleichert
 * address@hidden
 * http://vonbek.dhs.org/latest.jpg
 */




reply via email to

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