You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using Tk
w =Toplevel("Example") ## A titled top level window
f =Frame(w, padding = [3,3,2,2], relief="groove") ## A Frame with some options setpack(f, expand =true, fill ="both") ## using pack to manage the layout of f
b =Button(f, "Click for a message") ## Button constructor has convenience interfacegrid(b, 1, 1) ## use grid to pack in b. 1,1 specifies location## A callback to open a messagecallback(path) =Messagebox(w, title="A message", message="Hello World")
bind(b, "command", callback) ## bind callback to 'command' optionbind(b, "<Return>", callback) ## press return key when button has focus