Re: Gtk:::CellRendererText
- From: "Volosatov Alexander" <rope-walker yandex ru>
- To: gtkmm-list gnome org
- Subject: Re: Gtk:::CellRendererText
- Date: Wed, 8 Feb 2006 17:28:28 +0300 (MSK)
try to write analogue of Gtk function from gtk-demo:
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo),
renderer,
is_capital_sensitive,
NULL, NULL);
as i think analogue of this function in gtkmm is:
typedef sigc::slot<void, const TreeModel::const_iterator&> Gtk::CellLayout::SlotCellData
now i try to write:
void is_sensitive_combo_items(Gtk::TreeModel::const_iterator iter)
{
//always write 1
cout << iter;
//always write 0
cout << (*iter).parent();
if (iter == (*iter).parent())
{
pRenderer.property_sensitive() = false;
}
}
GTK:
static void
is_capital_sensitive (GtkCellLayout *cell_layout,
GtkCellRenderer *cell,
GtkTreeModel *tree_model,
GtkTreeIter *iter,
gpointer data)
{
gboolean sensitive;
sensitive = !gtk_tree_model_iter_has_child (tree_model, iter);
g_object_set (cell, "sensitive", sensitive, NULL);
}
but it does not work. How to set sensitive = false row in model.
Please help. I don't know how to do this :(((
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]