Reputation: 5857
Is it possible to apply partial borders (e.g. a border on only the right-hand edge, or on only the top and the bottom) to an element in Python Tkinter?
EDIT: This is the layout I'm trying to achieve - if anyone can see a better way of achieving this than partial borders, please feel free to point it out - I'm not very experienced with Tkinter!
Upvotes: 2
Views: 4185
Reputation: 386352
The answer to your question depends on what you mean by "borders". Individual widgets have borders (buttons, etc), and for those you can't change just part of the border.
If instead you're asking about how to layout your widgets so that there are dividing lines between them, you can do this with the padx
and pady
options of grid
and pack
. For those you can have different amounts of padding on each edge.
Upvotes: 2
Reputation: 772
There is no way to this built in to tkinter, but why do you need this behaviour? There is probably a better way to accomplish what you need. See this this resource for more help with your problem.
Upvotes: 1