Re: Editable toggle when multiple model cols in view col



> Murray Cumming wrote:
>> On Sun, 2006-09-17 at 02:41 +0100, Edd Dawson wrote:
>> [snip]
>>> The book
>>> (http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch08s02.html)
>>> says:
>>>
>>> "You must set the cell's editable property to true, like so:
>>>
>>> cell.property_editable() = true;"
>>>
>
> [ 8< --- snip ]
>
>>
>> I think you need to use the "activatable" property.
>
> That's what I suspected but I thought the last line of my code was editing
> the
> activatable property suitably? I tried replacing it with:
>
> rend->property_activatable() = true;
>
> This made no noticeable difference.
>
> One behavior that I have noticed is that if I leave the activatable
> property
> alone, the check-box is 'greyed-out'. So is activatable really the same as
> editable? It's certainly doing something, but not what I want.

Maybe you are not setting the new value in the model when the check box is
clicked. You need to not only set the cell to editable/activatable, but
respond to the edit/activate action and use (maybe after validating) the
new value. You should find examples of this in various programs, or you
can read the implementations of the add_column_editable() methods, which
also do this.


Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]