简体   繁体   English

Python Tkinter:BIG按钮上有多个图像和文本?

[英]Python Tkinter: multiple images and text on a BIG button?

Is it possible to mount more than one image AND text on a Tkinter button? 是否可以在Tkinter按钮上安装多个图像和文本?

Or, is it possible to put a FRAME containing images + text on a button? 或者,是否可以将包含图像和文本的FRAME放在按钮上?

I want a big button containing multiple widgets that, when taken together, fully describe the option the user will be able to choose. 我想要一个包含多个小部件的大按钮,这些小部件一起使用时,将充分描述用户将能够选择的选项。

I appreciate any suggestions!! 我感谢任何建议!

Is it possible to mount more than one image AND text on a Tkinter button? 是否可以在Tkinter按钮上安装多个图像和文本?

Strictly speaking, no, it is not possible. 严格来说,不,这是不可能的。

Or, is it possible to put a FRAME containing images + text on a button? 或者,是否可以将包含图像和文本的FRAME放在按钮上?

Yes, though it probably won't work on OSX. 是的,尽管它可能无法在OSX上运行。 It would probably take you less time to actually try it than to type in the question on stackoverflow. 与在stackoverflow上输入问题相比,实际尝试它可能会花费更少的时间。 A little research goes a long way. 进行一些研究会大有帮助。

You can also simply not use a button. 您也可以根本使用按钮。 Just use a frame or canvas, and set up bindings on the container and/or it's contents to react to a button click. 只需使用框架或画布,并在容器和/或其内容上设置绑定即可对按钮单击做出反应。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM