Entry completion and GtkCellRendererComboEntry
- From: dfg dfg <abxccd msn com>
- To: <gtk-app-devel-list gnome org>
- Subject: Entry completion and GtkCellRendererComboEntry
- Date: Sat, 24 Apr 2010 02:30:19 +0000
Hi everyone,
I have an interface designed in glade that contains a treeview which contains a CellRendererComboEntry. What
I'd like to do is attach an entry completion to it, such that one the user starts typing, a list of similiar
entries in my model will show up.
I have successfully hooked up a GtkComboEntry and an entrycompletion together, however I am having some
problems doing it with a CellRendererComboEntry.
This page shows that I can use the editing-started signal of CellRenderer to connect an entry completion to
my CellRendererComboEntry:
http://library.gnome.org/devel/gtk/unstable/GtkCellRenderer.html
What I have done in Glade is:
-Under the properties of the CellRendererComboEntry:
-Model set to a model defined in glade.
-Text column : 0
-Has entry: yes
-Editable: yes
-Under the signal properties of the CellRendererComboEntry:
-Under GtkCellRenderer, editing-started is assign the signal "cb_testfunc"
This is my code for the callback:
void cb_testfunc (GtkCellRenderer *cell, GtkCellEditable *editable, const gchar *path, gpointer data){
if (GTK_IS_ENTRY (editable)){
printf("It is editable");
}else{
printf("It is NOT editable");
}
}
When I run my program and attempt to edit the entry, I always get "It is NOT editable".
Does anyone know why the it is not editable, even though I have set the Editable property to yes in my
CellRendererComboEntry?
Cheers :)
_________________________________________________________________
Got a phone? Get Hotmail & Messenger for mobile!
http://go.microsoft.com/?linkid=9724464
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]