本文整理汇总了Python中Tkinter.Tk.wm_attributes方法的典型用法代码示例。如果您正苦于以下问题:Python Tk.wm_attributes方法的具体用法?Python Tk.wm_attributes怎么用?Python Tk.wm_attributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tkinter.Tk
的用法示例。
在下文中一共展示了Tk.wm_attributes方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import wm_attributes [as 别名]
def main():
root = Tk()
if platform.system()!="Darwin":
MyHwCtrl = Hardware_control()
MyHwCtrl.go_to_base()
root.geometry("480x320")
root.wm_title('Medimi')
if len(sys.argv) > 1 and sys.argv[1] == 'fs':
root.wm_attributes('-fullscreen', True)
os = platform.system()
print os
if platform.system()!="Darwin":
app = PiMenu(root, MyHwCtrl)
else:
print "Runnning on Mac"
app = PiMenu(root,None)
# myClock = Clock(root)
# root.bind("<Button-1>", callback, root) #
# myClock.tick()
root.mainloop()
示例2: main
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import wm_attributes [as 别名]
def main():
global fingerprint
root = Tk()
root.geometry("240x320")
root.wm_title('Marauders Map')
if len(sys.argv) > 1 and sys.argv[1] == 'fs':
root.wm_attributes('- fullscreen', True)
app = Marauders(root)
channel_hop.start_mon_mode('wlan0')
# Start channel hopping
iface = channel_hop.get_mon_iface()
#iface = 'wlan2'
hop = threading.Thread(target=channel_hop.channel_hop, args=[iface])
hop.daemon = True
hop.start()
os.system("sudo hciconfig hci0 reset")
#p = Popen(["hciconfig", "hci0", "down"], stdout=PIPE, stderr=PIPE, preexec_fn=os.setsid)
#p = Popen(["hciconfig", "hci0","up"], stdout=PIPE, stderr=PIPE, preexec_fn=os.setsid)
#p = Popen([app.path+"/ibeacon_scan","-b"], stdout=PIPE, preexec_fn=os.setsid)
if(os.path.isfile(app.path + '/fingerprint.pkl')):
fingerprint_file = open(app.path + '/fingerprint.pkl', 'rb')
fingerprint = pickle.load(fingerprint_file)
fingerprint_file.close()
root.mainloop()
示例3: main
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import wm_attributes [as 别名]
def main():
root = Tk()
root.geometry("320x240")
root.wm_title('PiMenu')
if len(sys.argv) > 1 and sys.argv[1] == 'fs':
root.wm_attributes('-fullscreen', True)
app = PiMenu(root)
root.mainloop()
示例4: run_text_editor
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import wm_attributes [as 别名]
def run_text_editor(filename):
root = Tk()
input_handler = user_input.user_input()
input_handler.start_instance(filename)
app = text_canvas.text_canvas(root, 12, input_handler, filename)
root.wm_attributes('-fullscreen', 1)
root.title('shim')
root.overrideredirect()
root.mainloop()
示例5: __init__
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import wm_attributes [as 别名]
def __init__(self, exactsol, sol, speed=5):
root = Tk()
root.title("Object Interception")
root.wm_attributes("-topmost", 1)
cv = Canvas(root,width=600,height=460)
cv.pack()
tmp1,l,tmp2,x_int=sol
fnt = ("Arial", 12, "bold")
tmp1,xexact=exactsol
attrFrame = Frame(root)
self.bullet_coor_Lbl= Label( attrFrame, width = 20, padx=20, text = " bullet position:\n (%8.4f,%8.4f)" % (x_int,-l), anchor=CENTER,font = fnt, height = 2)
self.proj_coor_Lbl=Label(attrFrame, width = 20, padx=20, text = " projectile position:\n (%8.4f,%8.4f)" %(0.0,0.0), anchor=CENTER, font = fnt, height = 2 )
self.time_Lbl=Label(attrFrame, width = 20, padx=20, text = " Time:\n %6.4f" %(0.0), anchor=CENTER, font = fnt, height = 2 )
self.error_Lbl=Label(attrFrame, width=20, padx=20, text= "Error:\n{0:6.2%}".format(0.0) ,font=fnt, anchor=CENTER,height=2)
for widget in (self.bullet_coor_Lbl, self.proj_coor_Lbl,self.time_Lbl,self.error_Lbl):
widget.pack(side=LEFT)
attrFrame.pack(side=TOP)
ctrlFrame = Frame(root) # contains Buttons to control the game
self.quitBtn = Button( ctrlFrame, width=11, text="OK", font=fnt,
state = NORMAL, padx=15, command = ctrlFrame.quit )
self.quitBtn.pack(side=LEFT)
ctrlFrame.pack(side=TOP)
# setup of the scene
x_axis= cv.create_line( 0, 400, 880, 400, fill='black')
self.dEngine = DrawEngine(cv,speed, exactsol, sol,self.display_bullet_coor,self.display_proj_coor, self.display_time,self.display_error)
root.mainloop()
root.destroy()