| | |
gtk.ListStore / gtk.ComboBoxEntry class problem
![]() |
•
•
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 |
abrupt ansi anti apache approximation array assignment avogadro backend beginner binary bluetooth book builtin calculator character cmd converter countpasswordentry curved customdialog dan08 decimals dictionaries dictionary dynamic error exe file float format function gnu graphics heads homework http ideas import inches input java leftmouse library line lines linux list lists loop module mouse mysqlquery number numbers numeric output parsing path phonebook plugin pointer prime programming progressbar py2exe pygame python random recursion redirect scrolledtext software sqlite statictext statistics string strings sum table terminal text textarea thread threading time tlapse trick tuple tutorial twoup ubuntu unicode urllib urllib2 variable wordgame write wxpython xlib






