0
Follow
0
View

Question about #python# tkinter.Button

dnsyxw 注册会员
2023-02-26 18:25

This answer part references GPT, GPT_Pro better solve the problem
To align the button text to the left of the button rectangle, Simply set the justify argument of the button to LEFT.

btna = Button(root, text = "按钮", command = go, justify = LEFT, borderwidth = 3)
btna.place(x = e, y = a, anchor = Nw, width = 28e, height = a)

The default value of this parameter is CENTER, which means that the text is aligned in the center. You can change it to LEFT to make the text aligned in the left.
If the answer is helpful, please accept it.

About the Author

Question Info

Publish Time
2023-02-26 18:25
Update Time
2023-02-26 18:25

Related Question

请问一下我的Python怎么总是elif出问题

Python蓝牙Mesh

了解一个在HackerRank上合并两个排序链表的python解决方案

python __init__错误运行,如何解决?

python setup.py build_ext --inplace命令报错

Python问题求解。

python语言程序设计基础第二版靠前大纲

Python sklearn.model_selection.validation_curve返回NaN值的整个数组

关于#python#的问题:python PSO 粒子群算法 多元函数求极小值问题 运行结果和迭代次数每次都不一样

字典问题不会写python