[gtkmm] Gtk::TreeView::append_column() doc: Modify the code exmaple



commit 422b14c879e5620e35aaf7932b86fd787d37a13f
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Sat Jan 18 10:19:00 2020 +0100

    Gtk::TreeView::append_column() doc: Modify the code exmaple

 gtk/src/treeview.hg | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index e1778b17..5f01512a 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -169,16 +169,13 @@ 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
+   * The returned value is useful, for example, for connecting the column renderer signal to
    * 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));
-   *
+   *    auto renderer =
+   *      dynamic_cast<Gtk::CellRendererText*>(mTreeView.get_column_cell_renderer(Ncolumns-1));
+   *    renderer->signal_edited().connect(sigc::mem_fun(*this, &MyWindow::on_name_edited));
    * @endcode
    *
    * @param title The text to be used in the title header of this column.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]