Definition Tk.title create title of the widget. Syntax tkinter.Tk.title(string) Tk.title(string) Examples The code created Label, Entry, and button with defined parameters of row and colum in grid.
The ButtonPress triggers the event which created new Tk widget while destroyed main Widget.
The button command function is used to invoke the message box to display the random value.
The random.randrange(a,b) is used to generate values for the creation of line.
Random color lines are created through the random.sample and random.randrange(a,b) methods through for loop.
The tkinter.Canvas create polygon method is used to create the random polygon point values and color is filled through random.sample method.
The reversed loop generated the oval through Canvas.create_oval method.
The day of birth values are added in Spinbox.
The button has positioned in LEFT, RIGHT, TOP, and BOTTOM in the Tk Widget.
The tkinter.Entry is used to check the string characteristics through string methods.
|