gtk.ListStore / gtk.ComboBoxEntry class problem

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2005
Posts: 18
Reputation: Avner .H. is an unknown quantity at this point 
Solved Threads: 0
Avner .H. Avner .H. is offline Offline
Newbie Poster

gtk.ListStore / gtk.ComboBoxEntry class problem

 
0
  #1
Nov 27th, 2005
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 ??
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 4,028
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 932
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: gtk.ListStore / gtk.ComboBoxEntry class problem

 
0
  #2
Nov 27th, 2005
I thought you loaded the combobox this way:
  1. comboBoxEntry.entry.set_text("String1")
  2.  
  3. # or
  4. slist = [ "String1", "String2", "String3", "String 4" ]
  5.  
  6. comboBoxEntry.set_popdown_strings(slist)
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 4,028
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 932
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: gtk.ListStore / gtk.ComboBoxEntry class problem

 
0
  #3
Dec 2nd, 2005
Was this of any help?

Still trying to get GTK to go on my Windows Box.
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 18
Reputation: Avner .H. is an unknown quantity at this point 
Solved Threads: 0
Avner .H. Avner .H. is offline Offline
Newbie Poster

Re: gtk.ListStore / gtk.ComboBoxEntry class problem

 
0
  #4
Dec 3rd, 2005
The command i forgot was :

  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...
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 4,028
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 932
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: gtk.ListStore / gtk.ComboBoxEntry class problem

 
0
  #5
Dec 3rd, 2005
Thanks Avner,

the gtk GUI sounds interesting. I make sure my next computer is a Linux machine!
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC