10 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for HiHe
Member Avatar for martineau
1
21K
Member Avatar for vegaseat

You can put an image and text on a Tkinter button widget. This small code shows you how. The GIF image file you want to use for the button should be in the working directory, or you have to give it the full path. Incorporate the Python Image Library (PIL) …

Member Avatar for neon_3
1
23K
Member Avatar for vegaseat
Member Avatar for vegaseat

Shows you how to create multiple Tkinter buttons in a loop, each with its own name, label and command response.

Member Avatar for CodingCabbage
2
1K
Member Avatar for TrustyTony

Here little debugged version of my calculator posted earlier in GUI calculator thread. I prepared it after listening that their teacher did more limited calculator in around 150 lines of code with their graphics module. This is 115 lines without empty lines and comment lines [CODE]>>> li=[i for i in …

Member Avatar for fonzali
1
2K
Member Avatar for vegaseat

Using the PySide GUI toolkit will make selecting, copying and pasting encrypted and decrypted text somewhat easier. Not ideal yet, but it will be a good start for those of you who are not very familiar with GUI programming.

Member Avatar for Lardmeister
2
523
Member Avatar for vegaseat

This Python snippet shows how to control a VPython visual 3D sphere with Tkinter GUI toolkit button clicks.

4
3K
Member Avatar for kaleem_ullah

I have developed a contact us page and also PHP code that works perfect. Know the only problem is that after submitting the form it shows only "Message sent" on a new page. I want that after submitting the form page will redirect back to home page. It is only …

Member Avatar for cjohnweb
0
3K
Member Avatar for TrustyTony

This code is based on code from series of programs [URL="http://www.ferg.org/thinking_in_tkinter/"]'Thinking in tkinter'[/URL] This code is not perfect, especially it does not recognize key release when mouse moves out of button area during push. Leave event could also be captured for that to stop the event in that case.

0
496
Member Avatar for TrustyTony

The End.