Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Tk_list_all_widget_options.py
- from tkinter import *
- import tkinter
- root = Tk() # needed for some of the widgets
- '''
- x, y = widget.x_root, widget.y_root
- OR
- row, column = widget.grid_info()
- rowspan, columnspan = widget.grid_size()
- '''
- print('...')
- # list all the widgets
- tk_features = []
- for feature in dir(tkinter):
- tk_features += [feature]
- widgets = []
- options_in_total = []
- for feature in tk_features:
- # print(feature)
- if feature.lower() not in ('image', 'tk'):
- try:
- options = eval(feature+'().config().keys()')
- widgets += [feature]
- for option in options:
- if option not in options_in_total:
- options_in_total += [option]
- print(option)
- except:
- try:
- options = eval(feature+'(root).config().keys()')
- widgets += [feature]
- for option in options:
- if option not in options_in_total:
- options_in_total += [option]
- print(option)
- except:
- 0
- print('\n\n')
- for widget in widgets:
- print(widget)
- '''
- activebackground
- activeforeground
- anchor
- background
- bd
- bg
- bitmap
- borderwidth
- command
- compound
- cursor
- default
- disabledforeground
- fg
- font
- foreground
- height
- highlightbackground
- highlightcolor
- highlightthickness
- image
- justify
- overrelief
- padx
- pady
- relief
- repeatdelay
- repeatinterval
- state
- takefocus
- text
- textvariable
- underline
- width
- wraplength
- closeenough
- confine
- insertbackground
- insertborderwidth
- insertofftime
- insertontime
- insertwidth
- offset
- scrollregion
- selectbackground
- selectborderwidth
- selectforeground
- xscrollcommand
- xscrollincrement
- yscrollcommand
- yscrollincrement
- indicatoron
- offrelief
- offvalue
- onvalue
- selectcolor
- selectimage
- tristateimage
- tristatevalue
- variable
- disabledbackground
- exportselection
- invalidcommand
- invcmd
- readonlybackground
- show
- validate
- validatecommand
- vcmd
- class
- colormap
- container
- visual
- labelanchor
- labelwidget
- activestyle
- selectmode
- setgrid
- listvariable
- activeborderwidth
- postcommand
- tearoff
- tearoffcommand
- title
- type
- direction
- menu
- aspect
- handlepad
- handlesize
- opaqueresize
- orient
- proxybackground
- proxyborderwidth
- proxyrelief
- sashcursor
- sashpad
- sashrelief
- sashwidth
- showhandle
- value
- bigincrement
- digits
- from
- label
- length
- resolution
- showvalue
- sliderlength
- sliderrelief
- tickinterval
- to
- troughcolor
- activerelief
- elementborderwidth
- jump
- buttonbackground
- buttoncursor
- buttondownrelief
- buttonuprelief
- format
- increment
- values
- wrap
- autoseparators
- blockcursor
- endline
- inactiveselectbackground
- insertunfocussed
- maxundo
- spacing1
- spacing2
- spacing3
- startline
- tabs
- tabstyle
- undo
- screen
- use
- Button
- Canvas
- Checkbutton
- Entry
- Frame
- Label
- LabelFrame
- Listbox
- Menu
- Menubutton
- Message
- PanedWindow
- Radiobutton
- Scale
- Scrollbar
- Spinbox
- Text
- Toplevel
- '''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement