[Python-Dev] Tkinter: modify xview of entry widget (original) (raw)
Michael Foord fuzzyman at voidspace.org.uk
Fri Aug 14 13:25:05 CEST 2009
- Previous message: [Python-Dev] Tkinter: modify xview of entry widget
- Next message: [Python-Dev] Tkinter: modify xview of entry widget
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
paolo.fragu at libero.it wrote:
Hi, I'm Paolo from Italy and I'm a python user. I wish to propose a useful and smart method modify in Tkinter Library:
Hi Paolo,
Can you create an issue on the bug tracker - with the patch attached.
Your suggestion stands a much better chance if this patch includes tests and documentation.
All the best,
Michael Foord
Previously to scroll this widget we had to write an external function (recalling xviewmoveto and xviewscroll).
With my method this operation is cleared and the same as all other widgets (just have to call xview). ---------------------------------------------------------- Modify Proposal: ---------------------------------------------------------- Change the method xview of entry so it works as all widget scrollable, and it's compatible with 'old' xview. So to scroll entry widget: entrywidget['xscrollcommand']=scrollwidget.set scrollwidget['command']=entrywidget.xview The change in module Tkinter is: def xview(self,*args): """Query and change horizontal position of the view.""" #modify if not args: return self.getdoubles(self.tk.call(self.w, 'xview')) #old code index=args[0] self.tk.call(self.w, 'xview', index) ---------------------------------------------------------- I wish that this implementation could be integrated in Tkinter, and I remain at disposal for any question or further information. Waiting for your response, Best regards Paolo Fraguglia
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
-- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog
- Previous message: [Python-Dev] Tkinter: modify xview of entry widget
- Next message: [Python-Dev] Tkinter: modify xview of entry widget
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]