| | |
gtk.ListStore / gtk.ComboBoxEntry class problem
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Aug 2005
Posts: 18
Reputation:
Solved Threads: 0
Hello everyone..!
I'm having a problem with gtk.ListStore class, while i'm trying to insert values into it.
It seems that after I create the class object and use each one of the functions which responsible for values insertion (insert, append, prepend etc...), the only value that gets inserted to the list is None!
e.g:
listStore = gtk.ListStore(str, int)
listStore.insert(0, ['Hello', 5])
comboBoxEntry = gtk.ComboBoxEntry(listStore)
The comboBoxEntry objects displays an empty row instead of the row inserted!
any ideas ??
I'm having a problem with gtk.ListStore class, while i'm trying to insert values into it.
It seems that after I create the class object and use each one of the functions which responsible for values insertion (insert, append, prepend etc...), the only value that gets inserted to the list is None!
e.g:
listStore = gtk.ListStore(str, int)
listStore.insert(0, ['Hello', 5])
comboBoxEntry = gtk.ComboBoxEntry(listStore)
The comboBoxEntry objects displays an empty row instead of the row inserted!
any ideas ??
I thought you loaded the combobox this way:
Python Syntax (Toggle Plain Text)
comboBoxEntry.entry.set_text("String1") # or slist = [ "String1", "String2", "String3", "String 4" ] comboBoxEntry.set_popdown_strings(slist)
May 'the Google' be with you!
•
•
Join Date: Aug 2005
Posts: 18
Reputation:
Solved Threads: 0
The command i forgot was :
after that, the text shuold appear in the combo box.
It works on Linux, I think it should work on Windows too...
Python Syntax (Toggle Plain Text)
comboBoxEntry.set_text_column(0)
after that, the text shuold appear in the combo box.
It works on Linux, I think it should work on Windows too...
![]() |
Similar Threads
- GTK code uses pointer for structs and not normal instances why? (C)
- pygtk Glade GUI freezes (Python)
- Abstract class homework problem (C++)
- Can't get GTK to work (Python)
Other Threads in the Python Forum
- Previous Thread: gtk.ComboBox
- Next Thread: freevo uses python
| Thread Tools | Search this Thread |
Tag cloud for Python
alarm assignment avogadro beginner bluetooth character cmd code copy customdialog cx-freeze data decimals dictionary directory dynamic error examples excel exe file float format ftp function generator gnu graphics gui halp homework http ideas import input itunes java leftmouse line linux list lists logging loop module mouse number numbers output parsing path port prime program programming projects push py2exe pygame pyglet pyqt python random recursion recursive schedule screensaverloopinactive script scrolledtext slicenotation sqlite ssh stdout string strings sudokusolver table terminal text thread threading time tkinter tlapse tuple tutorial ubuntu unicode update urllib urllib2 variable ventrilo verify vigenere webservice wikipedia windows wxpython xlib






