Rounded Tkinter button

Asked

Viewed 1,406 times

2

Is there any way to round the button tips? Or even leave it as a circumference?

Like this one for example: inserir a descrição da imagem aqui

  • 1

    With Tkinter I’m pretty sure not, it’s too simple just for visual things, try another library for that. I strongly recommend using kivy for GUI in a professional way. The Tkinter is only good for us to stop looking at the console a little, but it’s still the same thing basically.

  • Is the development in kivy very different from Tkinter? Without being the most complete part of it, I mean the coding?

  • And you indicate some Kivy course?

  • Course I won’t know how to tell you, but the python br guys have already adopted you. His scheme is a little different but the kivylang (his own language) is very quiet to learn. Take a look, why use Tkinter for something "professional" or commercial is bad, it’s like using winforms in C# Manja? The kivy has the advantage that you can make up smartphone app yet, multiplatform.

  • I found a complete, the minister is eXscript here the link to get this post: https://www.udemy.com/curso-de-python-android-ios-windows-linux-mac/

  • Po, dahora. I did some things in kivy and found cool, apparently have everything to start being the future of app with python, each of eXscript is good, I’ll put in the list for the future too.

Show 1 more comment

2 answers

3

Very easy, just create the image of the round button on these sites that create buttons in png format, dai vc create an instance of your image botao_redondo.png in a variable, type:

self.imgRedondo = PhotoImage(file='\\caminho\\botao_redondo.png')

next:

self.btnRedondo = Button(pai,image=self.imgRedondo,bd=0,relief=GROOVE,bg='A cor de fundo do pai do botão para que o canto do botão não apareça, fincando só a imagem do botão')

And finally, pack the button.

0

depends, you create 3 images, for example, a close button "X", an image for when the mouse does not have on it, and when the mouse has on it, and when it is clicked, then just set the FLAT Relief for all.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.