[pygtk] Re: Two columns in ComboBox with add_attribute

Jeffrey Barish jeff_barish at earthlink.net
Thu May 10 05:42:37 WST 2007


Jeffrey Barish wrote:

> Jeffrey Barish wrote:
> 
>> Also, I want the box to display the first item as soon as I create the
>> ComboBox.  What is the easiest way to do this?
> 
> I solved this one.  The child of the combo is a CellView, for which there
> is a set_displayed_row method.
> 
> cellview = combo.get_child()
> cellview.set_displayed_row(0)

Actually, there are problems.  If you select the first row, there will be a
changed event even though the selection did not actually change.

Also, the call to get_child() does not result in a changed event even though
there is a change.

Can someone explain why these behaviors are not bugs?
-- 
Jeffrey Barish



More information about the pygtk mailing list