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.
我想用 gtk2hs 构建一个 GUI,它将包含大量文本(不可编辑),每段文本都有不同的格式选项。是否有为此目的设计的 Gtk 小部件?什么样的小部件最适合这个?
您应该使用GtkTextView已设置为不可编辑的小部件。
GtkTextView
如果文本不是太长(几个短段落),您也可以使用 a GtkLabel,但如果段落的长度或数量太大,那么测量文本将开始成为性能问题。
GtkLabel