[Tutor] Treeview
John CORRY
john.corry at ntlworld.com
Sun May 14 12:47:02 CEST 2006
Hi,
I have managed to find the solution to my problem.
I have defined iter as
Iter = model.get_iter(combo3)
The code now works. I will show it below for completeness:
combo3 = self.wTree.get_widget("treeview1")
model=gtk.TreeStore(gobject.TYPE_STRING,gobject.TYPE_STRING,gobject.TYPE
_STRING,gobject.TYPE_STRING,gobject.TYPE_STRING,gobject.TYPE_STRING,gobj
ect.TYPE_STRING,gobject.TYPE_STRING)
self.hostsmodel = model
combo3.set_model(model)
combo3.connect("row_activated", self.callback53, combo3,model)
def callback53(self,data,combo3,data2,data3,model):
lookup = []
iter = model.get_iter(combo3)
counter = 0
while counter < 8:
result = model.get_value(iter,counter)
lookup.append(result)
counter = counter + 1
print lookup
Technically this is the first solution that I have been able to post on
the mailing list. Does this mean I am improving? Or does it not count
as I have solved my own problem?
Regards,
John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060514/9ea60351/attachment.htm
More information about the Tutor
mailing list