使用 ncurses 时使用的行数比窗口多
我最近被介绍使用 ncurses
来进行异步键盘按键监听,并且使用得很好。我面临的一个问题是,您只能在可见屏幕上显示文本,而没有滚动条。我想知道是否可以继续使用 ncurses,因为它是如此可爱,但让程序仍然保留滚动条,而不是到达最后一行并停留在那里。
I have recently been introduced to ncurses
for asynchronous keyboard key listening, and getting on well with it. One issue i'm facing is that you can only have text on the visible screen, no scrollbars. I was wondering if its possible to keep using ncurses
as it is so lovely, but have the program still keep the scrollbars rather than getting to the last line and staying there.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
scroll()。你必须先设置scrollok(win, TRUE)。实际上,如果你只是想像普通终端一样喷出数据,你只需要设置 scrollok() 本身。
scroll(). You have to set scrollok(win, TRUE) first. Actually if you just want to spew data like a normal terminal you only need to set scrollok() by itself.