Emil A.
Emil A.

Reputation: 3445

Set max width of a Gtk::TextView

I've created a textview which is being filled by a Gtk::TextBuffer, however the buffer contains a lot of characters and the window gets wider than the width of the screen.

Is there a way to define a max width for a Gtk::TextView?

Upvotes: 1

Views: 1396

Answers (1)

ptomato
ptomato

Reputation: 57920

Put the text view in a Gtk::ScrolledWindow and set the size request of the scrolled window.

Upvotes: 4

Related Questions