954,510 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

gtk.ListStore / gtk.ComboBoxEntry class problem

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 ??

Avner .H.
Newbie Poster
18 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

I thought you loaded the combobox this way:

comboBoxEntry.entry.set_text("String1")

# or
slist = [ "String1", "String2", "String3", "String 4" ]

comboBoxEntry.set_popdown_strings(slist)
vegaseat
DaniWeb's Hypocrite
Moderator
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
 

Was this of any help?

Still trying to get GTK to go on my Windows Box.

vegaseat
DaniWeb's Hypocrite
Moderator
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
 

The command i forgot was :

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...

Avner .H.
Newbie Poster
18 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

Thanks Avner,

the gtk GUI sounds interesting. I make sure my next computer is a Linux machine!

vegaseat
DaniWeb's Hypocrite
Moderator
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You