Class10_Frame framework

The final operation diagram (procedure is shown in ordinal number 2):


 



 

 



#!/usr/bin/env python # -*- coding:utf-8 -*- # ------------------------------------------------------------ # # Reference material:Python and Tkinter make simple window windows - NetEase cloud classroomHttps://study.163.com/course/courseLearn.htm? CourseId=1003216011#/learn/video? LessonId=1003650349& courseId=1003216011BePython:tkinter to change pictures regularly - CSDN blogHttps://blog.csdn.net/ztchun/article/details/69524485BeGUI Programming with Python: ButtonsIn TkinterHttps://www.python-course.eu/tkinter_buttons.php# ------------------------------------------------------------Class10_Frame * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *A great deal of people* * * * * * class10_Frame framework * * * * * * * * * * * * * * * * * * * * * * * * * * *=====> > > > > > content overview=====> > ≫ > > > content overview'' ''# ------------------------------------------------------------1, create a framework.# ------------------------------------------------------------# ------------------------------------------------------------2, generate multiple frameworks.# ----------------------------------------------------------'' ''



# ------------------------------------------------Split line# -----------------------------------------------# --------------------------------------------

 

 

# ------------------------------------------------Split line'' ''# -------------------------------------------1, create a framework.# ------------------------------------------------------------'' ''BeImport Tkinter as TKBeWindow = tk.Tk ()Window.title ('class10_Frame')Window.geometry ('400)X300')BeCreate a framework.FM = tk.Frame (window)Fm.pack ()A button is generated on the basis of FM.B1 = tk.Button (window).Text='[FM], fg='dark blue')B1.pack ()BeBeWindow.mainloop ()What is it?Dividing line'' ''What is it?------------------------------------------------2, generate multiple frameworks.# ------------------------------------------------------------'' ''Import Tkinter as TKWindow = tk.Tk ()Window.title ('class10_Frame')WIndow.geometry ('400x300')Create a frameworkFM = tk.Frame (window)Fm.pack ()On the basis of FM, we create a button.B1 = tk.Label (FM, text='[FM], fg='dark blue')B1.pack ()The left side frame is generated.Fm_l = tk.Frame (FM)Fm_l.pack (side='left')On the left side of the upper frame.Tk.Label (fm_l, text='fm_l').Pack ()The right side frame is formed.Fm_r = tk.Frame (FM)Fm_r.pack (side='right)The left side is placed on the left side of the upper frame.Tk.Label (fm_r, text='fm_r').Pack ()Window.mainloop ()

  

 

 

 


The final operation diagram (procedure is shown in ordinal number 2):

 


Leave a Reply

Your email address will not be published. Required fields are marked *