ctf温暖的冰 发表于 2020-3-24 11:11:30

button 位置移动

问题比较基础,各位大佬。
如图,button默认位置在中央,我咋调整到指定位置
使用什么命令

Hoiste 发表于 2020-3-24 11:19:37

https://fishc.com.cn/forum.php?mod=viewthread&tid=61537&extra=page%3D1%26filter%3Dtypeid%26typeid%3D604

zltzlt 发表于 2020-3-24 13:06:46

用 .place(),例如:

from tkinter import *

root = Tk()
root.geometry("460x240")

Button(root, text="按钮 1").place(x=100, y=200)
Button(root, text="按钮 2").place(x=200, y=100)
Button(root, text="按钮 3").place(x=200, y=200)

mainloop()

ctf温暖的冰 发表于 2020-3-24 14:08:19

zltzlt 发表于 2020-3-24 13:06
用 .place(),例如:

噗这么简单   哈哈哈感谢感谢
页: [1]
查看完整版本: button 位置移动