Auto Resize GtkTextView

This is my first time meeting GTK and Glade, and I have run into a really annoying problem. When I enter text in a TextView, the TextView automatically resizes larger, discarding other widgets.

This is really annoying behavior. I do not want my TextView to resize depending on the amount of text inside it.

Does anyone know what I can do to prevent TextView from resizing based on its contents?

+3
source share
3 answers

You must put GtkTextViewin GtkScrolledWindowwith the parameters " hscrollbar-policy" and " vscrollbar-policy" set to " automatic".

+2

, .

: TextView .

, - , .

0

Even inside GtkScrolledWindow, using GTK_POLICY_NONE GtkTextViewresizes when adding text. This is pretty unpleasant - impossible to have GtkTextViewwithout scrollbars.

0
source

Source: https://habr.com/ru/post/1742383/


All Articles