[pygtk] Problems with ComboBox

Paul Borghese pborghese at gmail.com
Wed Oct 11 19:14:51 WST 2006


Hi,

I have been experimenting with ComboBoxes and setup the following:

**        TabComboBox =3D gtk.combo_box_new_text()
        TabComboBox.append_text("First Selection")
        TabComboBox.append_text("Second Selection")
        TabComboBox.append_text("Third Selection")
        TabComboBox.set_add_tearoffs(True)
        TabComboBox.set_active(0)

        #Example of deletion
        for L in range(4):
            print L, "---->", TabComboBox.get_active_text()
            TabComboBox.remove_text(L)

        print "Completed Removals"
        TabComboBox.set_active(0)
        print "Current active is ....", TabComboBox.get_active_text()



When I run the program I see the following in the terminal:

0 ----> First Selection
1 ----> None
2 ----> None
3 ----> None
Completed Removals
Current active is .... Second Selection


Notice the "Second Selection" was never deleted.

Any ideas as to why "Second Selection" is never deleted?

Thanks!

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20061011/90bad147/at=
tachment.htm


More information about the pygtk mailing list