Re: [gtkmm] editable cells
- From: Martin Wackenhut <Martin Wackenhut it-dv-wackenhut de>
- To: murrayc usa net
- Cc: Martin Wackenhut <Martin Wackenhut it-dv-wackenhut de>, gtkmm-list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] editable cells
- Date: Thu, 16 Jan 2003 12:45:44 +0100
Ok,
here is the section in the documentation:
http://www.gtkmm.org/gtkmm2/docs/tutorial/html/ch08s02.html#id2843956
look at: Implementing custom logic for editable cells.
more precise:
I read a data set. Herein the bool variable is set to 1.
Lets say this is telling me that I already payed my electricity bill.
As I payed the gas bill today I want to set this flag to 1, too.
So I want to click onto the editable cell containing this flag.
As soon as I click there I also want a new calculation of the balance on
my bank accout. If I unset the flag put the money back onto this account.
So for something like this I need to check if I clicked there or not.
And if so I need to check what value the flag would be set to.
It might be that setting this flag is forbidden for some weird reason.
I previously tried it with the changed signal. So everytime I changed the
selection I checked if I was allowed to change the flag, if so it was set.
The drawback was: If I only have one item to select in my TreeView than
I can only set it once. If I realized that was wrong I have to open a
different list and then go back to the previous one to be able to trigger
the changed signal again.
What I can do now is to use a hidden column to make the flag uneditable.
But I would prefer to capture the input and determine what I want to set.
Check if that would be ok and if so edit the content of the editable cell
(not a bool necessarily, could be a text cell for the use as currency or
anything like that).
Martin
On Wed, Jan 15, 2003 at 05:28:03PM +0100, Murray Cumming wrote:
> On Tue, 2003-01-14 at 21:32, Martin Wackenhut wrote:
> > Hi,
> >
> > I want to use an editable bool in my TreeViewModel.
> > This all works fine now I only would like to be able to set this bool under
> > certain conditions(If a checkbox somewhere else is activated).
>
> So set the value in the model. What difference does it make that the
> view column is editable?
>
> >
> > The tutorials tells me something like
> > "Use the append and insert method, then connect to the cell renderer".
>
> In which section?
>
> >
> > I completely don't understand what to do whith this. I thought when I
> > append or insert a column I would just expand my list.
>
> "expand my list"? Doesn't appending or inserting a view column actually
> add a view column?
>
> >
> > Does anyone have a short example on how to do stuff like this?
>
> There are lots of examples that set data in the model.
>
> --
> Murray Cumming
> murray usa net
> www.murrayc.com
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
---end quoted text---
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]