簡體   English   中英

如何清除NCurses的特定線?

[英]How to clear a specific line with NCurses?

如何清除NCurses的特定線?

我需要在屏幕上擦除一行而不重繪整個內容。 我怎么做?

您可以在要清除的行上定位,然后調用clrtoeol函數。

這就是我最終為了我的目的而做的事情。

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可以做到這一點

如果要清除光標到最后一行的所有行,可以調用clrtobot()

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM