【问题标题】:How to display the arrow symbol in Python tkMessageBox?如何在 Python tkMessageBox 中显示箭头符号?
【发布时间】:2024-01-12 04:51:01
【问题描述】:
info = "Hello, Welcome" + "\n" + "Please follow the instructions"
tkMessageBox.showinfo("Welcome", info)

我应该在字符串信息中添加什么以在消息框的下一行显示“向上箭头符号”?

【问题讨论】:

    标签: python python-2.7 tkinter character-encoding


    【解决方案1】:

    使用 Unicode 字符串,并包含 suitable Unicode arrow character;以 U+2191 为例:

    info = u"Hello, Welcome\nPlease follow the instructions \u2191"
    tkMessageBox.showinfo("Welcome", info)
    

    【讨论】: