diff options
author | Timm Bäder <mail@baedert.org> | 2018-01-03 13:51:03 +0100 |
---|---|---|
committer | Daniel Boles <dboles@src.gnome.org> | 2018-01-07 16:38:41 +0000 |
commit | af1d5362abbbb0dd40ef25ef34ee2b02f1b67486 (patch) | |
tree | 8b12867a5348ddf6c49011e7a8e4ad5f8daa44bf | |
parent | 9cf48ec3f8f63fdf86776aadc3c7ccfef3331f69 (diff) | |
download | gtk+-af1d5362abbbb0dd40ef25ef34ee2b02f1b67486.tar.gz |
scrolledwindow: Fix code sample compilation
-rw-r--r-- | gtk/gtkscrolledwindow.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index 25e5d1cd3a..ac06f1cc10 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -70,8 +70,13 @@ * * If gtk_container_add() has added a #GtkViewport for you, you can remove * both your added child widget from the #GtkViewport, and the #GtkViewport - * from the GtkScrolledWindow, with either of these calls: + * from the GtkScrolledWindow, like this: * |[<!-- language="C" --> + * GtkWidget *scrolled_window = gtk_scrolled_window_new (NULL, NULL); + * GtkWidget *child_widget = gtk_button_new (); + * + * // GtkButton is not a GtkScrollable, so GtkScrolledWindow will automatically + * // add a GtkViewport. * gtk_container_remove (GTK_CONTAINER (scrolled_window), * child_widget); * // or |