Tkinter Widget-PanelWindow

PanelWindow widgets are used to create a container and we can manage the child widgets vertically or horizontally.

Syntax
-

w = PanedWindow(master, option)

Parameter-
Main- parent Window.
Option- attribute of PanedWindow widget.

Example
-
  1. from tkinter import *  
  2. m1 = PanedWindow()  
  3. m1.pack(fill=BOTH, expand=1)  
  4. left = Label(m1, text="Website")  
  5. m1.add(left)  
  6. m2 = PanedWindow(m1, orient=VERTICAL)  
  7. m1.add(m2)  
  8. top = Label(m2, text="c# corner")  
  9. m2.add(top)  
  10. bottom = Label(m2, text="www.c-sharpcorner.com")  
  11. m2.add(bottom)  
  12. mainloop()  
Output-


Summary

In this Chapter, you learnt what PanelWindow widget is and how to use the property of the widget.