[Patches] [ python-Patches-1621265 ] Auto-completion list placement

SourceForge.net noreply at sourceforge.net
Mon Feb 5 05:16:24 CET 2007


Patches item #1621265, was opened at 2006-12-23 08:16
Message generated for change (Comment added) made by kbk
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1621265&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: IDLE
Group: Python 2.6
Status: Open
Resolution: None
>Priority: 5
Private: No
Submitted By: Tal Einat (taleinat)
>Assigned to: Kurt B. Kaiser (kbk)
Summary: Auto-completion list placement

Initial Comment:
The completion list placement logic is currently very primitive. Sometimes the completion list extends outside of the editor window, or even outside the screen so that part of it is not visible.

This patch places the completion list inside the text widget if possible, above or below the typed text, as appropriate. It will not hide the currently typed text in any case.

End-cases:
* If the text widget is not high enough, the completion list is placed below the currently typed text.
* If the text widget is not wide enough, the completion list is aligned with the left-most edge of the text widget.

In any case the size of the completion list is not altered to fit the text widget, though this would probably be the best solution when the text widget is too small. This means that with this patch, the completion list may extend beyond the text widget if it is small.

I have not implemented resizing of the list this since the list's size is currently not set at all - Tk's default is used. Changing it anywhere in the code would require setting it elsewhere, hard-coding a default or making it configurable, etc.

Comments please!

----------------------------------------------------------------------

>Comment By: Kurt B. Kaiser (kbk)
Date: 2007-02-04 23:16

Message:
Logged In: YES 
user_id=149084
Originator: NO

Haven't you introduced a regression on [ 1571112 ] simple moves freeze
IDLE by the changes at the beginning of the patch?  Also, the assignment to
previous_completion was intended to make the code clearer.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1621265&group_id=5470


More information about the Patches mailing list