0

I have a GtkSourceView widget with some text, it works fine.

I'd like to change the contents of the associated text buffer when the user resizes the view widget; I am having trouble doing this reliably. What is the preferred method?

The SourceView widgets are inside a GtkPaned, that can be resized either by the user moving the splitter, or when the container window changes size.

ejgallego
  • 6,709
  • 1
  • 14
  • 29
  • 1
    When the user resizes the _widget_ or the _window_? (You can't directly resize a widget, and widgets can resize as a result of more than just user interactions.) – ptomato Nov 29 '16 at 02:42

1 Answers1

1

Connect to the source view's size-allocate signal (with g_signal_connect_after()) and change the contents of the buffer at that point.

ptomato
  • 56,175
  • 13
  • 112
  • 165