PySimpleGUI:column/frames 的索引

PySimpleGUI: index of column/frames

我在 PySimpleGUI 中制作了一个图形用户界面并创建了 3 列,但是当我尝试添加第四列时,它会出现在另一列并且 This.I want that the column where i store the buttons stays in his position. Here 's the code too. Is it possible to change the index? Here another image to let you see how the work should be 唯一的区别是我想添加 colc(名称列的)留在白色部分。

# Import delle liberie
from config import *
import tkinter as tk
import PySimpleGUI as sg
import datetime
font = ("Times New Roman", 11)
#import di tkinter per 
x = tk.Tk()
x.withdraw()
now = datetime.datetime.now()
time=now.strftime("%Y-%m-%d %H:%M:%S")
width = x.winfo_screenwidth()
height = x.winfo_screenheight()
size = (140, height)
size1 = (width, 100)

colc= [
    [sg.Text("testo"), sg.Input()],
    [sg.Text("testo"), sg.Input()],
    [sg.Text("testo"), sg.Input()],
    [sg.Text("testo"), sg.Input()],
    [sg.Text("testo"), sg.Input()]
]

inputbottom = [
   [sg.Text("Input →", background_color="blue"), sg.Input(size=(209, 50))],
   
    
    ]

logo = [
        
        [sg.Image(filename ='img/logo.png', background_color="blue")],
              
        
    ]

col1 = [ 
           
           [sg.Text(time, justification="c", background_color="blue", key='-TEXT-')],
           [sg.Button("Avvia Standard", size=(14, 6), button_color=('gray'),)],
           [sg.Button("Avvia Multipla", size=(14, 6), button_color=('gray'))],
           [sg.Button("Concludi Singola", size=(14, 6), button_color=('gray'))],
           [sg.Button("Concludi tutto", size=(14, 6), button_color=('gray'))],
           [sg.Button("Mostra Attive", size=(14, 6), button_color=('gray'))],
           [sg.Button("Login", size=(14, 6), button_color=('gray'),)],
           [sg.Button("Logout", size=(14, 6), button_color=('gray'))]
           ]

frametop = [[sg.Column(logo, background_color='Blue')]]
buttons =  [[sg.Column(col1,background_color='Blue')]]



layout = [
        
        [sg.Column(frametop, size=size1, background_color='Blue', justification="top", pad=(0, 0))],
        [sg.Column(colc, pad=(0,0))],
        [sg.Column(buttons, size=(140, 845), background_color='Blue', justification="right", pad=(0, 0))],
        [sg.Column(inputbottom, justification="top", background_color="Blue", size=(width, 400), pad=(0,0))],
        
        
          ] 

window = sg.Window('CMF-GESTIONALE',layout,resizable=True, finalize=True,size=(width, height),icon='img/Icona.ico',background_color='white', font=font,margins=(0,0)).Finalize()
window.Maximize()

# Eventi Bottoni
while True:
    
    event, values = window.read()
    if event == sg.WIN_CLOSED or event == 'Logout':
        break
    if event == 'Avvia Standard':
        print("-")
    if event == 'Avvia Multipla':
        print("-")
    if event == 'Concludi Singola':
        print("-")
    if event == 'Concludi tutto':
        print("-")
    if event == 'Mostra Attive':
        print("-")
    if event == 'Login':
        print("-")
    
     
window.close()

如果您需要左列和右列的布局,请在此处查看示例代码

import PySimpleGUI as sg

sg.theme("DarkBlue3")
sg.set_options(font=("Courier New", 16))

left = [[sg.Text("testo"), sg.Input()] for i in range(5)]
right = [[sg.Button(f"Button {i}")] for i in range(10)]
layout = [
    [sg.Text("Top Line")],
    [sg.Column(left, vertical_alignment='top'), sg.Column(right, vertical_alignment='top')],
    [sg.Text("Bottom Line")],
]
window = sg.Window('Title', layout, finalize=True)

while True:

    event, values = window.read()
    if event == sg.WINDOW_CLOSED:
        break
    print(event, values)

window.close()