【发布时间】:2011-07-01 16:01:41
【问题描述】:
如何使用 NCurses 清除特定行?
我需要在屏幕上擦除一条线而不重新绘制整个内容。 我该怎么做?
【问题讨论】:
如何使用 NCurses 清除特定行?
我需要在屏幕上擦除一条线而不重新绘制整个内容。 我该怎么做?
【问题讨论】:
如果要清除从光标到最后一行的所有行,可以调用clrtobot()
【讨论】:
这就是我最终出于我的目的而这样做的方式。
int y, x; // to store where you are
getyx(stdscr, y, x); // save current pos
move(y, 0); // move to begining of line
clrtoeol(); // clear line
move(y, x); // move back to where you were
【讨论】:
也许crltoeol 可以解决问题
【讨论】:
你可以定位到你要清除的行,然后调用clrtoeol函数。
【讨论】: