Top-rated recipes tagged "entry"http://code.activestate.com/recipes/tags/entry/top/2017-04-08T12:27:36-07:00ActiveState Code RecipesTkinter search box (Python)
2017-04-08T12:27:36-07:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580773-tkinter-search-box/
<p style="color: grey">
Python
recipe 580773
by <a href="/recipes/users/4189907/">Miguel Martínez López</a>
(<a href="/recipes/tags/entry/">entry</a>, <a href="/recipes/tags/search/">search</a>, <a href="/recipes/tags/searchbox/">searchbox</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
Revision 9.
</p>
<p>Instead of using two colors for active background and normal background, I use only one color and opacity parameter.</p>
<p>I trigger the feeling of a button using different colors when the mouse is and isn't over. Many modern HTML search boxes uses the same approach.</p>
<p>Command function receives text of entry box when button is pressed.</p>
Tkinter entry with placeholder (Python)
2017-04-06T14:21:03-07:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580768-tkinter-entry-with-placeholder/
<p style="color: grey">
Python
recipe 580768
by <a href="/recipes/users/4189907/">Miguel Martínez López</a>
(<a href="/recipes/tags/entry/">entry</a>, <a href="/recipes/tags/placeholder/">placeholder</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
Revision 8.
</p>
<p>The function <em>add_placeholder_to</em> adds a placeholder to a tkinter entry.</p>
<p>Parameters:</p>
<ul>
<li><em>entry:</em> Tkinter widget to add placeholder</li>
<li><em>placeholder:</em> Text of placeholder</li>
<li><em>color:</em> Color of placeholder (optional)</li>
<li><em>font</em>: Font of placeholder (optional)</li>
</ul>
<p>A placeholder state object is attached to attribute "placeholder_state" of entry widget for future reference. It makes more easier to configure state of placeholder, or change the preferences of the user for color and font for the placeholder.</p>
<p>This widget is added also to my Metro Tkinter recipe:</p>
<p><a href="https://code.activestate.com/recipes/580729-metro-ui-tkinter/" rel="nofollow">https://code.activestate.com/recipes/580729-metro-ui-tkinter/</a></p>
Tag entry for Tkinter like Jquery Tag It (Python)
2017-04-07T12:30:13-07:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580734-tag-entry-for-tkinter-like-jquery-tag-it/
<p style="color: grey">
Python
recipe 580734
by <a href="/recipes/users/4189907/">Miguel Martínez López</a>
(<a href="/recipes/tags/entry/">entry</a>, <a href="/recipes/tags/megawidget/">megawidget</a>, <a href="/recipes/tags/tag/">tag</a>, <a href="/recipes/tags/text/">text</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
Revision 2.
</p>
<p>Tag editing widget for tkinter. It's similar to jQuery tag it:
<a href="http://aehlke.github.io/tag-it/" rel="nofollow">http://aehlke.github.io/tag-it/</a></p>
An Entry with autocompletion for the Tkinter GUI (Python)
2012-09-06T19:16:09-07:00Miguel Ángel Alarcos Torrecillashttp://code.activestate.com/recipes/users/4183471/http://code.activestate.com/recipes/578253-an-entry-with-autocompletion-for-the-tkinter-gui/
<p style="color: grey">
Python
recipe 578253
by <a href="/recipes/users/4183471/">Miguel Ángel Alarcos Torrecillas</a>
(<a href="/recipes/tags/autocomplete/">autocomplete</a>, <a href="/recipes/tags/entry/">entry</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
Revision 2.
</p>
<p>An example of how to make an entry widget with autocompletion for the Tkinter GUI. It uses regular expression but you can subclass AutocompleteEntry and override the comparison method.</p>
<p>You can use the arrow keys 'up' and 'down' to select an item at the listbox, and the 'right' key to take it to the entry widget.</p>
Combobox Autocomplete (Python)
2017-04-03T15:17:26-07:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580770-combobox-autocomplete/
<p style="color: grey">
Python
recipe 580770
by <a href="/recipes/users/4189907/">Miguel Martínez López</a>
(<a href="/recipes/tags/autocomplete/">autocomplete</a>, <a href="/recipes/tags/combobox/">combobox</a>, <a href="/recipes/tags/entry/">entry</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
Revision 11.
</p>
<p>This is my own version of combobox autocomplete. The user can customize the matching function setting whether he wants to ignore case or whether the matching function should only match from the beginning of the string. The other possibility is to provide your own "auto complete function". The complete function returns all the found strings matching the text in the entry box.</p>
<p>It's also possible to customize the height of listbox and whether to use horizontal or vertical scrollbars.</p>
<p>Use arrows or Contro+n, Control+p to move selection on listbox.</p>
<p>This is a practical application of the combobox widget:</p>
<p><a href="https://code.activestate.com/recipes/580771-tkinter-file-autocomplete-entry/" rel="nofollow">https://code.activestate.com/recipes/580771-tkinter-file-autocomplete-entry/</a></p>
Tkinter file autocomplete entry (Python)
2017-04-03T15:18:36-07:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580771-tkinter-file-autocomplete-entry/
<p style="color: grey">
Python
recipe 580771
by <a href="/recipes/users/4189907/">Miguel Martínez López</a>
(<a href="/recipes/tags/autocomplete/">autocomplete</a>, <a href="/recipes/tags/entry/">entry</a>, <a href="/recipes/tags/file/">file</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
Revision 9.
</p>
<p>I define a "File_Entry" widget to make more easier to the final user to write and search for a path. I am using my own version of combobox widget:</p>
<p><a href="https://code.activestate.com/recipes/580770-combobox-autocomplete/" rel="nofollow">https://code.activestate.com/recipes/580770-combobox-autocomplete/</a></p>