Re: Finding the column index for a Gtk::TreeViewColumn from a Gtk::TreeView



On Mon, 24 Apr 2006 09:46:12 +0200 Murray Cumming <murrayc murrayc com>
waved a wand and this message magically appeared:

> On Mon, 2006-04-24 at 00:18 +0100, Alex Buell wrote:
> [snip]
> 
> > because we don't know which column it is when my custom editable
> > cell validation routines are called.
> 
> Provide the _model_ index to the signal_edited or signal_toggled
> signal handler, using sigc::bind().
> 
> [snip]

Aha! That was exactly what I needed to implement with the Gtk::Table
containing an array of Gtk::Entry objects! Brilliant solution:

m_Entry[i][j].signal_activate().connect(sigc::bind<int, int>
(sigc::mem_fun(*this, &SudokuCreater::on_entry_activate), i, j)); 

m_Entry[i][j].signal_changed().connect( sigc::bind<int, int>
(sigc::mem_fun(*this, &SudokuCreater::on_entry_changed), i, j));

Works a treat now, thanks!

-- 
http://www.munted.org.uk

Take a nap, it saves lives.



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