Python Tkinter: Attach scrollbar to listbox as opposed to window

后端 未结 2 1595
刺人心
刺人心 2020-12-30 09:23

Here is a screenshot of my window at present:

\"screenshot\"

My problem is that I simply cannot get the

2条回答
  •  Happy的楠姐
    2020-12-30 09:40

    Since you're using place (which I don't recommend), just do some math to calculate the position of the scrollbar.

    The better choice in this specific case is to use grid, because you clearly want things organized in rows and columns. The header is row 0, and the listbox/scrollbar combination(s) are in row 1. The first header goes in columns 0 and 1, the listbox in column 0, and the scrollbar in column 1. The second header goes in column 2, and the other listbox goes in column 3.

提交回复
热议问题