如何在pysimplegui中增加输入文本框?

2024-09-28 03:25:18 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用了尺寸,但没有改变:

input = [
    [sg.Text("Type your text")],
    [sg.InputText(key='text', size=(200,200))],
    [sg.Button("Sent")]
]

wInput = sg.Window("Exercicio Python", input, size=(400,450))

while True:
    events, values = wInput.read()
    if events == sg.WINDOW_CLOSED:
        break

我所拥有的:

enter image description here

我想要的是:

enter image description here


Tags: keytextinputyoursize尺寸typebutton
1条回答
网友
1楼 · 发布于 2024-09-28 03:25:18

enter image description here

I used :

    input = [
    [sg.Text("Type your text")],
    [sg.Multiline(key="texto", size=(50, 20))],
    [sg.Button("Sent")]
]

相关问题 更多 >

    热门问题