Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
use Tk; my $mw=new MainWindow; $mw->geometry("1024x768"); $mw->Scrolled("Text", -scrollbars => "s", -width => 30,-height=>10)->pack( ); MainLoop;
我需要帮助。水平滚动条不起作用。我究竟做错了什么?
文本小部件的换行模式是什么?如果它被配置为在单词或字符边界上换行,则永远不需要水平滚动条。对我来说,默认的换行模式是char(即,在字符边界处换行,就像终端一样)所以我想这也是你的默认设置,尽管你想要它是none(唯一设置水平滚动条很有用)。
char
none
将您的选项添加-wrap => "none",到Scrolled.
-wrap => "none",
Scrolled