[gtkmm: 1/2] Gtk::TreeView::append_column() doc: Add code example
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm: 1/2] Gtk::TreeView::append_column() doc: Add code example
- Date: Sat, 18 Jan 2020 08:55:38 +0000 (UTC)
commit 9666c28a4e2f321023639888af4770c91d097460
Author: Pavlo Solntsev <p sun fun gmail com>
Date: Thu Jan 16 07:58:05 2020 -0600
Gtk::TreeView::append_column() doc: Add code example
gtk/src/treeview.hg | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index c99ef809..e1778b17 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -169,6 +169,18 @@ public:
* manually and use TreeViewColumn::set_cell_data_func() to provide a callback
* that converts the model value into a string representation with .
*
+ * The returned value is useful, for example, for the connection the column renderer signal to a
+ * a slot:
+ *
+ * @code
+ *
+ * int Ncolumns = mTreeView.append_column("Column Title", mColumns.mName);
+ * auto renderer
+ * = dynamic_cast<Gtk::CellRendererText*>(mTreeView.get_column_cell_renderer(Ncolumns-1));
+ * renderer.signal_edited().connect(sigc::mem_fun(*this, &myFunc));
+ *
+ * @endcode
+ *
* @param title The text to be used in the title header of this column.
* @param model_column The column in the TreeModel that will be rendered by this View column.
* @result The number of columns in the View after appending.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]