Skip to content

Comma instead of dot with decimal numbers at SpinBox #328

Answered by antrrax
AsimovMo asked this question in Q&A
Discussion options

You must be logged in to vote

Isso não deve ser um bug.
Provavelmente seu sistema operacional está em portugues e o ttkbootstrap usa as variaveis de ambiente do idioma do seu sistema operacional. O ttk original usa as variáveis em ingles.

Em portugues o separador decimal é a virgula e não o ponto. Basta voce adequar seu código a interface gráfica.

veja no arquivo widgets.py essa linha 13:
import locale


para referencias futuras:
https://phrase.com/blog/posts/beginners-guide-to-locale-in-python/
https://herrmann.tech/pt/blog/2021/02/05/como-tratar-dados-com-formatacao-internacional-no-python.html

locale.atof (convert a string to a floating point number)
locale.atoi (convert a string to integer)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AsimovMo
Comment options

Answer selected by AsimovMo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants