Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
AutoEntry blocked while typing #110
When you start typing into the entry field of a autoentry the entry box is blocked an you cant see what your typing. Is there a possibility of offsetting there the words are shown so you can see the entry box?
Upon a quick investigation (on OSX, with python 2.7 & 3.4), I don't quite see the issue you mention. The entryBox is always visible, but the drop-down of options gets hidden?
Is this what you mean? Or, are you saying that the entryBox gets covered by the options drop-down?
Either way, I think the issues are related...
The drop-down is simply a listBox widget that is (meant to be) temporarily shown over the top of the widgets beneath the entry box.
It can't exists outside the bounds of the appJar window. So, if there's no space to show it under the entryBox (in OSX at least), then it gets hidden. I'll investigate in Windows, to see if there is different behaviour (with it being drawn over the top of the entry box?).
One solution is to always ensure you have space underneath the entry, to show the drop-down.
An extra feature, could be to have the listBox appear above the entry if necessary (& possible) - this may not involve too much re-engineering...
An alternative feature would be to make the window extend to accommodate the listBox. Again, not too hard, but perhaps better left up to the developer to decide on window size?
Other than those three options, I don't really see a solution. I don't think a widget can exist outside the bounds of the tkinter window? And I don't think spawning an extra window to show the options would work well enough (or look good enough) to be worth the effort.
I need to investigate in Windows first, to see what the behaviour is...
Yes this is what I was seeing. I realize this was due in part to my negligence in not realizing I was making such a small window and expecting the window to resize when the options appeared.
I believe this would be a better solution for aesthetics.
My thoughts on the behavior on the AutoEntry. It should look like and EntryBox and OptionBox combination. As you type it only show matches (just as it does now), but also have the drop down for selection. You should also be able to pass a max number of rows to be shown with the ability to scroll through all the options.
Or create a new type of entry called addEntryListBox() where this behavior available.
Either way the OptionBox needs to have some way to limit the number of rows being displayed. The DatePicker would benefit from this as well. That way it would not show 31 options and take up most of the screen/window when selecting a date.
added a commit
Apr 10, 2017
@lieuzhenghong - this is definitely not intended behaviour!
It's also not the behaviour I see on OSX (10.11.6) python 2.7.13 & 3.6.1 or Linux(Raspbian) python 2.7.9 or 3.4.2. What platform, version of python, version of appJar are you running?
In appJar, the
Equally, showing the list box is bound to a trace on the textVar, so it should only be visible when at least one character is present in the entry or the arrow keys are pressed...
Can you try out one of my test programs: https://github.com/jarvisteach/appJar/blob/appJar/examples/1_autoEntry.py
The 1st & 7th entries are AutoEntries...
@jarvisteach Yours looks fine for me. I am using Python 3.5.2+, Ubuntu 16.10,