[pygtk] How to clear/delete all values from the gtk.Liststore

2011-12-13 Thread Arun p das
I am new to pygtk. currently i am doing one application using pygtk and glade.
my Question is How to clear/delete all values from the gtk.Liststore.
I am using the liststore as model for combobox.
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] How to clear/delete all values from the gtk.Liststore

2011-12-13 Thread Zoltán Vörös

Hi,

self.builder.get_object('liststore_some_liststore').clear() should work. 
You can also do something like this:



model = self.builder.get_object('treeview_some_treeview').get_model()
model.clear()

if you just want to clear the list store linked to a treeview or whatever.
I hope this helps,

Zoltán

On 12/13/2011 04:14 PM, Arun p das wrote:

I am new to pygtk. currently i am doing one application using pygtk and glade.
my Question is How to clear/delete all values from the gtk.Liststore.
I am using the liststore as model for combobox.
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] How to clear/delete all values from the gtk.Liststore

2011-12-13 Thread Pietro Battiston
Il giorno mar, 13/12/2011 alle 20.44 +0530, Arun p das ha scritto:
 I am new to pygtk. currently i am doing one application using pygtk and glade.
 my Question is How to clear/delete all values from the gtk.Liststore.

How about gtk.ListStore.clear() and, more in general, reading the
documentation for gtk.ListStore?

Pietro

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] How to clear/delete all values from the gtk.Liststore

2011-12-13 Thread Yann Leboulanger

Le 13/12/2011 16:14, Arun p das a écrit :

I am new to pygtk. currently i am doing one application using pygtk and glade.
my Question is How to clear/delete all values from the gtk.Liststore.
I am using the liststore as model for combobox.


http://pygtk.org/docs/pygtk/class-gtkliststore.html will help you.

liststore.clear() is the function you're looking for.
--
Yann
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/