[gtk+] scrolledwindow: Fix code sample compilation
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] scrolledwindow: Fix code sample compilation
- Date: Wed, 3 Jan 2018 16:09:31 +0000 (UTC)
commit 4a999cbd1f5b1ff1dc9df7ba273de6378c5298d7
Author: Timm Bäder <mail baedert org>
Date: Wed Jan 3 13:51:03 2018 +0100
scrolledwindow: Fix code sample compilation
gtk/gtkscrolledwindow.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index ece2bb2..4f9933e 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]