I can't figure out how to put buttons on top off my background picture, I've tried many forums, but none off the answers worked

前端 未结 2 874
一整个雨季
一整个雨季 2021-01-17 03:47

So I am making a \"HUB\" for my game, and I got my background there, but I can\'t display the buttons over the background. I\'ve searched up on many forums and none off the

2条回答
  •  再見小時候
    2021-01-17 04:34

    The simplest solution for using a background image is to use place to add the image as a background. place won't change anything about the size of the parent or the layout of any other widgets in the parent, and other widgets can be added on top with grid or pack like you normally would.

    Note that it's important that you create the image widget before you create the other widgets so that it is lower in the stacking order. Alternatively, you can call the lower() method on the widget to move it to the bottom of the stacking order.

    Example:

    background1.place(relx=.5, rely=.5, anchor="c")
    

提交回复
热议问题