问题
How to do a textbox in terminal ruby applications? Is there a gem for this or it can be done using pure ruby.
回答1:
If you are on Ruby 1.9.x, you can take a look at rbcurse, a
ruby based curses widgets: fields, buttons, textarea. menus, message boxes, tabbed panes, tables, listboxes, splitpanes, scrollpanes. Event based, MVC architecture.
The developer recently split the functionality up into
- https://github.com/rkumar/rbcurse-core
- https://github.com/rkumar/rbcurse-extras
- https://github.com/rkumar/rbcurse-experimental
回答2:
I wrote tty-box for creating flexible terminal boxes.
You can do more complex layouts of many boxes that are interlinked as well.
来源:https://stackoverflow.com/questions/8463986/how-to-do-a-textbox-in-terminal-ruby-applications