python 2.7 - Tkinter Treeview cannot edit more that one column -


i use tkinter treeview populate data file.

the result 6 columns of prefilled numeric data each row. rows has single column value, others has multiple columns filled data, editable user (upon mouse right click).

for rows single editable column, use following piece of code:

... self.tree.insert(id2 , 2,    text=key2.strip('\r\n'), \   values=("","","10","","",""), \   tags=('','','tag3','','',''))   self.tree.tag_bind(('','','tag3','','',''), '<button-3>', self.popupentry) ... 

result: (ok) if right click dialogbox popup text entry, upon validation, column of corresponding row successfully filled new value. works single value tuple "tags".

but, rows more 1 editable column modified previous code follow:

... self.tree.insert(id2 , 2,    text=key2.strip('\r\n'), \   values=("","","10","","","10"), \   tags=('','','tag3','','','tag6'))   self.tree.tag_bind(('','','tag3','','','tag6'), '<button-3>', self.popupentry) ... 

result: (not ok) no reaction mouse right click, nothing happens

desired behavior: - rows 2 or more editable columns, right-click spawn dialogbox 2 text entries, upon validation, 2 column values filled.

something that: enter image description here

popup code:

   def popupentry(self, event):         result = tksimpledialog.askinteger("new value", "please enter new numeric value")         if result:             self.tree.item(self.tree.focus(), values=self.tag_to_val(self.tree.item(self.tree.focus(), 'tags'), result)) 

you can't bind group of tags that. must create binding each individual tag.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -