Creating a GUI with Entry Fields
Part 3 of creating a GUI to convert units.
We'll cover the following
Final version
You will make your final edit and change the OptionMenus
to Entry
fields and let Pint
figure out the rest. You will get rid of the dropdown menus and let the user type in the units. The last iteration of our converter program will look like this:
Column 1 | Column 2 | Column 3 | |
---|---|---|---|
Row 1 | Label saying “Converter” |
||
Row 2 | Label saying “Convert” |
Entry field for inputting a str |
Entry field for unit |
Row 3 | Label saying “into” |
||
Row 4 | Label that will eventually have the computed result |
Entry field for unit |
|
Row 5 | Button saying “Calculate” |
You need to edit the Column 3 widgets again. This time, you can get rid of any pressure lists
and make the widget an open-ended Entry
widget.
Get hands-on with 1400+ tech skills courses.