【问题标题】:how to place every text in record at the left side of the label?如何将记录中的每个文本放在标签的左侧?
【发布时间】:2021-02-19 05:43:58
【问题描述】:
print_records = '''
    for record in records:
        print_records += str(record[0]) + "          " + str(record[1]) + "          " + str(record[2]) \
                         + "          " + str(record[3]) + "          " + str(record[4]) + "          " + str(record[5]) \
                         + "          " + str(record[6]) + "          " + str(record[7]) + "\n"

        show = Label(root, width=120,  text=print_records, anchor=NW)
        show.grid(row=2, column=3, columnspan=2)
        show.place(x=402, y=50, height=510)
        show.config(font=("TimesNewRoman", 10))

【问题讨论】:

    标签: python database sqlite tkinter widget


    【解决方案1】:

    Label(...) 中添加justify="left"

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-28
      • 1970-01-01
      • 2018-08-04
      • 1970-01-01
      • 2015-10-16
      • 1970-01-01
      相关资源
      最近更新 更多