| | |
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 |
advanced aliased bash beginner bits calling casino changecolor class clear command convert corners count csv cturtle cursor def definedlines dictionary digital dynamic dynamically event events examples external file float format frange function google gui hints homework i/o iframe import info input java line linux list lists loop matching mouse multiple number numbers obexftp output parsing path port prime programming projects py py2exe pygame pygtk python random rational raw_input recursion return scrolledtext signal singleton skinning stderr string strings subprocess table tails terminal text thread threading time tkinter tlapse tuple tutorial ubuntu unicode urllib urllib2 valueerror variable voip web-scrape whileloop word wxpython






