943,752 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 5104
  • Python RSS
Nov 27th, 2005
0

gtk.ListStore / gtk.ComboBoxEntry class problem

Expand Post »
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 ??
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Avner .H. is offline Offline
18 posts
since Aug 2005
Nov 27th, 2005
0

Re: gtk.ListStore / gtk.ComboBoxEntry class problem

I thought you loaded the combobox this way:
Python Syntax (Toggle Plain Text)
  1. comboBoxEntry.entry.set_text("String1")
  2.  
  3. # or
  4. slist = [ "String1", "String2", "String3", "String 4" ]
  5.  
  6. comboBoxEntry.set_popdown_strings(slist)
Moderator
Reputation Points: 1333
Solved Threads: 1403
DaniWeb's Hypocrite
vegaseat is offline Offline
5,792 posts
since Oct 2004
Dec 2nd, 2005
0

Re: gtk.ListStore / gtk.ComboBoxEntry class problem

Was this of any help?

Still trying to get GTK to go on my Windows Box.
Moderator
Reputation Points: 1333
Solved Threads: 1403
DaniWeb's Hypocrite
vegaseat is offline Offline
5,792 posts
since Oct 2004
Dec 3rd, 2005
0

Re: gtk.ListStore / gtk.ComboBoxEntry class problem

The command i forgot was :

Python Syntax (Toggle Plain Text)
  1. 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...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Avner .H. is offline Offline
18 posts
since Aug 2005
Dec 3rd, 2005
0

Re: gtk.ListStore / gtk.ComboBoxEntry class problem

Thanks Avner,

the gtk GUI sounds interesting. I make sure my next computer is a Linux machine!
Moderator
Reputation Points: 1333
Solved Threads: 1403
DaniWeb's Hypocrite
vegaseat is offline Offline
5,792 posts
since Oct 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: gtk.ComboBox
Next Thread in Python Forum Timeline: freevo uses python





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC