()
| 4958 | |
| 4959 | |
| 4960 | def _test(): |
| 4961 | root = Tk() |
| 4962 | text = "This is Tcl/Tk %s" % root.globalgetvar('tk_patchLevel') |
| 4963 | text += "\nThis should be a cedilla: \xe7" |
| 4964 | label = Label(root, text=text) |
| 4965 | label.pack() |
| 4966 | test = Button(root, text="Click me!", |
| 4967 | command=lambda root=root: root.test.configure( |
| 4968 | text="[%s]" % root.test['text'])) |
| 4969 | test.pack() |
| 4970 | root.test = test |
| 4971 | quit = Button(root, text="QUIT", command=root.destroy) |
| 4972 | quit.pack() |
| 4973 | # The following three commands are needed so the window pops |
| 4974 | # up on top on Windows... |
| 4975 | root.iconify() |
| 4976 | root.update() |
| 4977 | root.deiconify() |
| 4978 | root.mainloop() |
| 4979 | |
| 4980 | |
| 4981 | __all__ = [name for name, obj in globals().items() |
no test coverage detected