Re: [pygtk] catch key_press_event on gtk.CellRendererText (or gtk.TreeViewColumn)

2011-03-24 Thread Giuseppe Penone
Thank you Iñigo, I have the callback working now.
Best regards,
Giuseppe.


On Thu, Mar 24, 2011 at 12:16 AM, Iñigo Serna inigose...@gmail.com wrote:

 Hi,

 On 23 March 2011 18:59, Giuseppe Penone gius...@gmail.com wrote:
  Hi,
  I have a table with editable cells implemented with liststore+treeview in
 my
  application http://giuspen.com/cherrytree .
  I'm trying to connect a callback to any char inserted in a editable
  liststore cell but I cannot find a way since
 
 [...]
 
  If anybody has an example to provide or a clue please help me.
  Thanks  best regards,
  Giuseppe.

 Take a look at:

 https://bitbucket.org/inigoserna/bidebarrieta/src/517f2cbc48d8/ui/listview.py

 * definition: method __add_tvcol(), lines 87-95
 * action callbacks: methods on_text_edited_started() and
 on_text_edited(), lines 336-394


 Hope it helps,
 Iñigo Serna

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

[pygtk] catch key_press_event on gtk.CellRendererText (or gtk.TreeViewColumn)

2011-03-23 Thread Giuseppe Penone
Hi,
I have a table with editable cells implemented with liststore+treeview in my
application http://giuspen.com/cherrytree .
I'm trying to connect a callback to any char inserted in a editable
liststore cell but I cannot find a way since

1) when the user is inserting text in an editable liststore text cell the
event is not catched from the treeview
2) neither gtk.CellRendererText nor gtk.TreeViewColumn descend from a widget
(but gtk.object instead).
3) I tried to connect signals to gtk.object how explained in
http://faq.pygtk.org/index.py?req=showfile=faq23.034.htp but no result
connecting either the gtk.CellRendererText and the gtk.TreeViewColumn

If anybody has an example to provide or a clue please help me.
Thanks  best regards,
Giuseppe.
___
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] catch key_press_event on gtk.CellRendererText (or gtk.TreeViewColumn)

2011-03-23 Thread Alessandro Dentella
On Wed, Mar 23, 2011 at 06:59:24PM +0100, Giuseppe Penone wrote:
 Hi,
 I have a table with editable cells implemented with liststore+treeview in my
 application http://giuspen.com/cherrytree .
 I'm trying to connect a callback to any char inserted in a editable liststore
 cell but I cannot find a way since
 
 1) when the user is inserting text in an editable liststore text cell the 
 event
 is not catched from the treeview

It should not in fact. In that moment it's a gtk.Entry your widget and
that's the widgets that feels the events.

 2) neither gtk.CellRendererText nor gtk.TreeViewColumn descend from a widget
 (but gtk.object instead).

no problem

 If anybody has an example to provide or a clue please help me.
 Thanks  best regards,

You can see [1] but it's probably a bit difficult to understand it at a
glance. The sense it that in the editing_started_cb the 'editable' var
contains the gtk.Entry, you can connect to that Entry to implement wahtever
you need. 


sandro
*:-)




[1] 
http://hg.argolinux.org/py/sqlkit/file/b27e0a1085ef/sqlkit/widgets/table/columns.py#l457



-- 
Sandro Dentella  *:-)
http://www.reteisi.org Soluzioni libere per le scuole
http://sqlkit.argolinux.orgSQLkit home page - PyGTK/python/sqlalchemy
___
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] catch key_press_event on gtk.CellRendererText (or gtk.TreeViewColumn)

2011-03-23 Thread Giuseppe Penone
Great help, I finally connected the callback, thank you very much.
Best regards,
Giuseppe.


On Wed, Mar 23, 2011 at 7:58 PM, Alessandro Dentella san...@e-den.itwrote:

 On Wed, Mar 23, 2011 at 06:59:24PM +0100, Giuseppe Penone wrote:
  Hi,
  I have a table with editable cells implemented with liststore+treeview in
 my
  application http://giuspen.com/cherrytree .
  I'm trying to connect a callback to any char inserted in a editable
 liststore
  cell but I cannot find a way since
 
  1) when the user is inserting text in an editable liststore text cell the
 event
  is not catched from the treeview

 It should not in fact. In that moment it's a gtk.Entry your widget and
 that's the widgets that feels the events.

  2) neither gtk.CellRendererText nor gtk.TreeViewColumn descend from a
 widget
  (but gtk.object instead).

 no problem

  If anybody has an example to provide or a clue please help me.
  Thanks  best regards,

 You can see [1] but it's probably a bit difficult to understand it at a
 glance. The sense it that in the editing_started_cb the 'editable' var
 contains the gtk.Entry, you can connect to that Entry to implement wahtever
 you need.


 sandro
 *:-)




 [1]
 http://hg.argolinux.org/py/sqlkit/file/b27e0a1085ef/sqlkit/widgets/table/columns.py#l457



 --
 Sandro Dentella  *:-)
 http://www.reteisi.org Soluzioni libere per le scuole
 http://sqlkit.argolinux.orgSQLkit home page -
 PyGTK/python/sqlalchemy
 ___
 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] catch key_press_event on gtk.CellRendererText (or gtk.TreeViewColumn)

2011-03-23 Thread Iñigo Serna
Hi,

On 23 March 2011 18:59, Giuseppe Penone gius...@gmail.com wrote:
 Hi,
 I have a table with editable cells implemented with liststore+treeview in my
 application http://giuspen.com/cherrytree .
 I'm trying to connect a callback to any char inserted in a editable
 liststore cell but I cannot find a way since

[...]

 If anybody has an example to provide or a clue please help me.
 Thanks  best regards,
 Giuseppe.

Take a look at:
https://bitbucket.org/inigoserna/bidebarrieta/src/517f2cbc48d8/ui/listview.py

* definition: method __add_tvcol(), lines 87-95
* action callbacks: methods on_text_edited_started() and
on_text_edited(), lines 336-394


Hope it helps,
Iñigo Serna
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/