A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-August/091153.html below:

[Python-Dev] Tkinter: modify xview of entry widget

[Python-Dev] Tkinter: modify xview of entry widget [Python-Dev] Tkinter: modify xview of entry widgetpaolo.fragu at libero.it paolo.fragu at libero.it
Fri Aug 14 13:21:29 CEST 2009
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:

Previously to scroll this widget we had to write an external function  (recalling xview_moveto and xview_scroll).

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:

entry_widget['xscrollcommand']=scroll_widget.set
scroll_widget['command']=entry_widget.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 



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4