21 lines
1017 B
Markdown
21 lines
1017 B
Markdown
|
**Example Program for Reddit**
|
||
|
|
||
|
![SNAG-0493.jpg](/api/files/5da0cf239520ebc04c0de405/snag-0493.jpeg "SNAG-0493.jpg")
|
||
|
|
||
|
Sometimes little programs are written to demonstrate concepts for Reddit posts.
|
||
|
These make good teaching tools so you'll find a few have made it onto the list.
|
||
|
|
||
|
This program demonstrates simple input from and output to a window. Additionally
|
||
|
a couple of parameters are used to "complete" the interface so that it's nice
|
||
|
for the user. Think for a moment about how people will use your GUI... take a
|
||
|
moment to design it. There were 2 options in this program that were nice
|
||
|
finishing touches.
|
||
|
1. The return key signals the user has completed input
|
||
|
2. After the output is displayed, the input field is cleared for the next entry
|
||
|
|
||
|
This program also uses the `change_look_and_feel` call to quickly add some color
|
||
|
to the window.
|
||
|
|
||
|
<iframe src='https://trinket.io/embed/pygame/d863b4a36c?start=result' width='100%' height='400' frameborder='0' marginwidth='0' marginheight='0' allowfullscreen></iframe>
|
||
|
|