proffreda

Listing of Widget classes

Apr 13th, 2016
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. _Listing of Widget classes_
  2.  
  3. tkinter provides common GUI elements to build interface – such as buttons, menus and various kinds of entry fields and display areas. We call these elements widgets, and we construct a tree of widgets – each widget will have a parent widget, all the way up to the root window of our application. For example, a button or a text field needs to be inside some kind of containing window. Here is a list of common widgets.
  4.  
  5. _Frame_ is a container widget which is placed inside a window, which can have its own border and background – it is used to group related widgets together in an application’s layout.
  6.  
  7. _Toplevel_ is a container widget which is displayed as a separate window.
  8.  
  9. _Canvas_ is a widget for drawing graphics. In advanced usage, it can also be used to create custom widgets – because we can draw anything we like inside it, and make it interactive.
  10.  
  11. _Text_ displays formatted text, which can be editable and can have embedded images.
  12.  
  13. _Button_ usually maps directly onto a user action – when the user clicks on a button, something should happen.
  14.  
  15. _Label_ is a simple widget which displays a short piece of text or an image, but usually isn’t interactive.
  16.  
  17. _Message_ is similar to a Label, but is designed for longer bodies of text which need to be wrapped.
  18.  
  19. _Scrollbar_ allows the user to scroll through content which is too large to be visible all at once.
  20.  
  21. _Checkbutton_, _Radiobutton_, _Listbox_, _Entry_ and _Scale_ are different kinds of input widgets – they allow the user to enter information into the program.
  22.  
  23. _Menu_ and _Menubutton_ are used to create pull-down menus.
Advertisement
Add Comment
Please, Sign In to add comment