Ahhh curses, how thou hath plagued me.
I looked for quite a while, and I couldn't see a way. What happens in curses I believe is that when something is drawn, stuff stays over it until it is drawn over. Basically objects don't clean up after themselves, and they have no particular relation between screen real estate, and the internal objects that govern them (as would a real window-driven UI such as the Finder or Windows)
That being said, you can either output characters over it, using various text positioning commands available to you through the curses library or you can use clear() on the screen(check out
man ncurses for the full set).
- clear($win) takes an object window created by Curses
#!/usr/bin/perl -w
use strict;
use Curses;
my $win = new Curses;
clear($win);
#$win->clear(); #may also work
- Check out mvwaddstr and mvwaddnstr if you're looking to blit out blank text where a widget would have been.
$win->addstr(12, 34, 'perlmonks forevah');
#or:
#$win->addstr(12, 34, ' ');
Good luck with it. I used to do tons of stuff with curses, but not so much anymore, and it was in C, but the libs/exports are the same as the man page, so that may be a good place to look.
--jb
- Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
- Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
-
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
-
Please read these before you post! —
-
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
-
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
- Link using PerlMonks shortcuts! What shortcuts can I use for linking?
-
See Writeup Formatting Tips and other pages linked from there for more info.