Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Question] Unmodifiable (seemingly) Column padding

オープン
#6,555 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
frontend

調査の方向性

まず、提供されている Python 再現コードを PySimpleGUI 3.11.6 および tkinter 8.6.13 で実行し、ネストされた Column 要素と Window の element_padding 設定に注目します。Issue にはソースファイルもテストも記載されていません。可視の間隔を設定可能かどうかを判断し、その動作を文書化または修正することで完了となります。

索引モデルが issue の本文から書いたものです。

説明

Question

Operating System

macOS 14.0

PySimpleGUI Port (tkinter, Qt, Wx, Web)

Not sure, just installed via pip


Versions

Version information can be obtained by calling sg.main_get_debug_data()
Or you can print each version shown in ()

Python version (sg.sys.version)
PySimpleGUI Version (sg.__version__)

3.11.6

GUI Version (tkinter (sg.tclversion_detailed), PySide2, WxPython, Remi)

8.6.13


Your Experience In Months or Years (optional)

Years Python programming experience

5

Years Programming experience overall

7

Have used another Python GUI Framework? (tkinter, Qt, etc) (yes/no is fine)

no

Anything else you think would be helpful?


Troubleshooting

These items may solve your problem. Please check those you've done by changing - [ ] to - [X]

  • Searched main docs for your problem www.PySimpleGUI.org
  • Looked for Demo Programs that are similar to your goal. It is recommend you use the Demo Browser! Demos.PySimpleGUI.org
  • None of your GUI code was generated by an AI algorithm like GPT
  • If not tkinter - looked for Demo Programs for specific port
  • For non tkinter - Looked at readme for your specific port if not PySimpleGUI (Qt, WX, Remi)
  • Run your program outside of your debugger (from a command line)
  • Searched through Issues (open and closed) to see if already reported Issues.PySimpleGUI.org
  • Have upgraded to the latest release of PySimpleGUI on PyPI (lastest official version)
  • Tried using the PySimpleGUI.py file on GitHub. Your problem may have already been fixed but not released
Detailed Description

The sg.Column element seems to have some unmodifiable padding that is not removed by setting sg.Window's element_padding parameter to (0, 0). If same-width sg.Column's are nested with colored backgrounds (code attached), it becomes easily observable by naked eye.

Code To Duplicate

A short program that isolates and demonstrates the problem (Do not paste your massive program, but instead 10-20 lines that clearly show the problem)


import PySimpleGUI as psg


layout = [[
    psg.TabGroup(
        layout=[[
            psg.Tab(
                'Test',
                layout=[[
                    psg.Column(
                        layout=[[
                            psg.Column(
                                layout=[[psg.Column(
                                    layout=[[psg.Text('test', pad=(0, 0))]],
                                    size=(400, 50),
                                    background_color='green',
                                    pad=(0, 0),
                                )]],
                                size=(400, 100),
                                background_color='blue',
                                pad=(0, 0),
                            )
                        ]],
                        size=(400, 400),
                        background_color='red',
                        pad=(0, 0),
                    )
                ]],
            ),
        ]],
        background_color='violet',
        pad=(0, 0)
    )
]]

window = psg.Window('Test', layout, size=(500, 500), margins=(0, 0), border_depth=0, element_padding=(0, 0))

while True:
    event, values = window.read()
    if event in (psg.WIN_CLOSED, 'Exit'):
        break
window.close()

Screenshot, Sketch, or Drawing

Watcha Makin?

A simple resource tracker for a PC game.

主要言語
Python
スター
13.8k
フォーク
1.8k
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PySimpleGUI/PySimpleGUI のほかの issue

PySimpleGUI/PySimpleGUI の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。