Re: Changing a GtkCellRendererCombo based on another column
- From: Murray Cumming <murrayc murrayc com>
- To: gtk-list <gtk-list gnome org>
- Subject: Re: Changing a GtkCellRendererCombo based on another column
- Date: Mon, 14 Apr 2008 18:58:01 +0200
On Mon, 2008-04-14 at 17:14 +0200, Murray Cumming wrote:
> Let's say I have two columns in my treeview: country and town.
>
> When the user selects something from the combobox in the country column,
> I want the contents of the combobox to change in the town column, so
> that the user only sees towns in that country.
>
> I could just change the town combobox model in response to the country's
> "edited" signal, but when you click on a GtkCellRendererCombo, it shows
> its menu before the previous cell has emitted that signal.
Nevermind, this is no problem when using the
GtkCellRenderer::"editing-started" signal, which is emitted _after_ the
"edited" signal has been emitted by the other cell.
For some reason I had a hack involving "button-press-event" on the
treeview, instead of using "editing-started". Maybe my code was pre-GTK
+-2.6.
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]