cptx032 / cptx032/boring

Implementar um material entry

Open
#23 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Implementar um material entry. O código abaixo é a animação do placeholder

```python
font_size = 12
from Tkinter import *
top = Tk()
top['bg'] = 'white'
ca = Canvas(top, bg='white', bd=0, highlightthickness=0)
ca.grid(pady=5, padx=5)
top.bind('', lambda e : top.destroy(), '+')
font = ca.create_text(10, 10, fill='#aaa', anchor='nw', text='Enter your password', font=('TkDefaultFont', font_size))

TICKER = 20
def tick():
global font_size
if font_size > 5:
font_size -= 1
else:
ca.itemconfig(font, fill='#2980b9')
ca.itemconfig(font, font=('Arial', font_size))
top.after(TICKER, tick)
top.bind('<1>', lambda e : tick(), '+')
top.mainloop()

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.