Re: Diabling an entry in TreeView
- From: "Andrew E. Makeev" <andrew solvo ru>
- To: Pramod Patangay <pramod patangay gmail com>
- Cc: gtk-list gnome org
- Subject: Re: Diabling an entry in TreeView
- Date: Tue, 31 May 2005 11:29:03 +0400
Pramod Patangay wrote:
Hi,
I have a treestore and corresponding model and treeview. I would like
to disable a particular entry in the treeview. How can I do this?
If you have access to source codes you may look at gtkcellrenderertext.c
file for function: gtk_cell_renderer_text_render().
There you should see that "state = GTK_STATE_INSENSITIVE" is what you
are looking for.
I guess, the simplest way is to code your CellRenderer derived from
GtkCellRendererText, and reimplement function render, so, it should look
at some CellRenderer::property and decide what state should be set for
current cell.
Actually, you only need to reset "render" function for
GtkCellRedndererClass this way:
static void my_gtk_cell_renderer_text_render(...)
{
...
}
some_function()
{
...
GtkCellRenderer *text_render = gtk_cell_renderer_text_new();
GtkCellRendererClass *render_class = GTK_CELL_RENDERER_GET_CLASS(
text_render );
render_class->render = my_gtk_cell_renderer_text_render;
...
}
Regards,
-andrew
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]