summaryrefslogtreecommitdiff
path: root/gtk/gtkscrolledwindow.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2018-01-03 13:51:03 +0100
committerTimm Bäder <mail@baedert.org>2018-01-03 17:11:32 +0100
commit4a999cbd1f5b1ff1dc9df7ba273de6378c5298d7 (patch)
tree852dfa79138e026a3b3b1161e7ae5da99c72417f /gtk/gtkscrolledwindow.c
parent7f300c9da77e1995ad28aa653ee75f0d5ccc34fe (diff)
downloadgtk+-4a999cbd1f5b1ff1dc9df7ba273de6378c5298d7.tar.gz
scrolledwindow: Fix code sample compilation
Diffstat (limited to 'gtk/gtkscrolledwindow.c')
-rw-r--r--gtk/gtkscrolledwindow.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index ece2bb2155..4f9933e808 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -68,8 +68,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