
#Python easyframe methods software
However, my code generates this error from the grading software regarding the 2 fields.īind the Enter (Return) key to the Celsius fieldBind the Enter (Return) key to the Fahrenheit fieldĭescriptionSearched your code for a specific pattern: The apply method is run when the user selects the dialog’s OK button. Each method to add a widget includes the master argument that is received by the body method. The body method adds widgets to the dialog’s window. The init method sets any window attributes. It passes 1/2 checks, Program implements conversion GUI correctly 30 Celsius to Fahrenheit 100/100, 68 Fahrenheit to Celsius 100/100. This subclass should include the init, body, and apply methods. When I run this code the GUI presents the box correctly, when I click or hit Enter the selected box computes the inverse function. """Inputs the Fahrenheit degrees and outputs the Celsius degrees.""" It includes all of the methods of its parent class, tkinter.Canvas, as well as methods to draw geometric shapes and text and methods to handle mouse events. Self.addButton(text = ">",row = 2, column = 0,command = puteFahr) This class represents a rectangular area in which geometric shapes, text, or images can be drawn. Self.fahrField = self.addFloatField(value = 32.0, Self.celsiusField = self.addFloatField(value = 0.0, Responds to a return key event in the entry fields.ĮasyFrame._init_(self, title = "Temperature Converter")

Illustrates the use of numeric data fields. Tkinter window position setting, geometry ( ) method can not only set. Temperature conversion between Fahrenheit and Celsius. tkinter set window position Tkinter Window position Python GUI Tutorial-ApiDemos. If the user presses this key when the insertion point is in a given field, the action which uses that field for input is triggered. Modify the temperature conversion program so that it responds to the user’s press of the return or enter key.
