tkinter 文本字体设置
时间: 2023-09-18 19:07:30 浏览: 94
在tkinter中,可以使用text.configure(font='font_name')来设置文本的字体。但是,如果指定的字体不存在,tkinter会使用一种替代字体。你还可以使用以下方法来获取文本小部件中当前光标的位置:text.index('insert')。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [tkinter - 如何设置字体的文本?](https://blog.csdn.net/weixin_30320081/article/details/118899169)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [Tkinter动态字体大小更改](https://blog.csdn.net/weixin_30275391/article/details/113964343)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文