TinkterNoteBook
Library
TkDocs
Python interface to Tcl/Tk
tkinterbook
steps:
tk —> frame —> button/label/xxxx —-> pack
Features
title name and constraint the frame size
PROGRAM_NAME = "Footprint Editor" |
Entry
delete and get the text.
e = Entry(master) |
StringVar
v = StringVar() |
This example creates an Entry widget, and a Button that prints the current contents:
from Tkinter import * |
Terminology
- cascading menus: Items are things like the “Open…” command in a File menu, but also separators between other items, and items which open up their own submenu
- “tear off” Linux systme
Notice
On Mac OS X though, there is a single menubar along the top of the screen, shared by each window.
Handy Reference:
fred = Button(self, fg=”red”, bg=”blue”)
After object creation, treating the option name like a dictionary index
fred[“fg”] = “red”
Use the config() method to update multiple attrs subsequent to object creation.
fred.config(fg=”red”, bg=”blue”)
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Good Day!





