开发者

How to make non-square edges in Tkinter?

In order to make one of my programs more aesthetically pleasing I'm using images to create the boarders, however I want to create a non square boarder so the program looks kinda like this

  ___________
 /          /
/__________/

How should I go about this?

This is on windows 7, btw.

Edit:

A trie开发者_运维知识库d to make a pseudo-edge using transparency however it doesn't come out transparent. For some reason it cam out as a dark grey. I want the red to be the "edge".

How to make non-square edges in Tkinter?


The concept you are after is called a "shapped window". Search for "tk shaped window" with your favorite search engine. There is a tk extension that claims to support this, though I haven't personally tried it. I presume since it works with tcl/tk it can be made to work with Tkinter since Tkinter uses tcl/tk under the hood.


I'm not familiar with Tkinker, but you could make an image with transparency where you don't want the border, which would make pseudo-slanted edges. There is no way for a window to be non-square however (For a good reason too).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜