Conditional CellRenderCombo in pyGTK TreeView

Posted by Präriewolf on Stack Overflow See other posts from Stack Overflow or by Präriewolf
Published on 2010-04-21T10:39:47Z Indexed on 2010/04/21 10:43 UTC
Read the original article Hit count: 189

Filed under:
|
|

I have a two column TreeView attached to a ListStore. Both columns are CellRenderCombo combo boxes.

When the user selects an entry in the first box, I need to dynamically load a set of options in the second.

For example, the behavior I want is:

On row 0, the user selects "Alphabet" in the first column box.
     The second column box is populated with the letters "A-Z".
On row 1, the user selects "Numbers" in the first column box.
     The second column box is populated with the numbers "0-9".
On row 2, the user selects "Alphabet" in the first column box.
     The second column box is populated with the letters "A-Z".
etc.

Does anyone know how to do this, or seen any open source pygtk or gtk projects that have similar behavior which I can analyze?

© Stack Overflow or respective owner

Related posts about python

Related posts about pygtk