Hi Frederic-Emmanuel, 

On Thu, May 19, 2005 at 01:57:40PM +0200, Frederic-Emmanuel PICCA wrote:
> I am trying to use the gtkTreeView with a column Renderer which is a
> CellRendererToggle.
> 
> so I have created a TreeStore with my last column containing a boolean.
> So I assigne this column (7) to the CellRendererToggle.

Columns number from 0 to 7 according to 

  [EMAIL PROTECTED]:~/309764$ grep append_column diffractometer.py|wc -l
  8

But you assign using 

  self.insert_row(self.reflectionmodel, None, (1, 2, 3, 4, 1, 0, True))
  #                       Column numbers:      0  1  2  3  4  5  6
  self.insert_row(self.reflectionmodel, None, (1, 2, 3, 4, 1, 0, False))

> Now when you press the Add Reflection button, the on_button1_clicked
> callback try to add two lines:
>   - one with the toggle equal to True
>   - one equal to False
>
> Nevertheless the toggle button is always the same.
> 
> So is it a bug ?

Yes, but in your code ;-) The toggle is always off since you in fact do
not set it. Changing insert_row invocations to add one more value fixes
the problem. One might argue that some type checking would be nice.

Please tell me if this helped and if this bug can be closed.

Greetings

        Torsten

Attachment: signature.asc
Description: Digital signature

Reply via email to