1
1
## Animation Button
2
2
### Example-1
3
3
![ animation_button.gif] ( /image/animation_button.gif )
4
-
5
- ### Python Code
6
- ``` py
7
- from tkinter import RIGHT , SE
8
- from animationButton import AnimationButton
9
-
10
- ''' app is a master (root) window object
11
- first please create reference for Tk class
12
- '''
13
- AnimationButton(app, text = ' accept' , fgcolor = ' black' , event = ' 1' ).pack(side = RIGHT , anchor = SE , padx = (5 ,10 ), pady = (0 ,5 ))
14
- AnimationButton(app, text = ' cancel' , fgcolor = ' black' , event = ' 1' ).pack(side = RIGHT , anchor = SE , pady = (0 ,5 ))
15
- ```
16
-
17
- ### Example-2
18
- ![ animation_button-2.gif] ( /image/animation_button-2.gif )
19
-
20
4
### Python Code
21
5
``` py
22
6
from tkinter import LEFT , X, NW
@@ -37,3 +21,16 @@ AnimationButton(M, text='Friday', bgcolor='green', fgcolor='black').pack(anchor=
37
21
AnimationButton(M, text = ' Saturday' , bgcolor = ' blue' ).pack(anchor = NW , fill = X)
38
22
AnimationButton(M, text = ' Sunday' , bgcolor = ' blue' ).pack(anchor = NW , fill = X)
39
23
```
24
+ ### Example-2
25
+ ![ animation_button-2.gif] ( /image/animation_button-2.gif )
26
+ ### Python Code
27
+ ``` py
28
+ from tkinter import RIGHT , SE
29
+ from animationButton import AnimationButton
30
+
31
+ ''' app is a master (root) window object
32
+ first please create reference for Tk class
33
+ '''
34
+ AnimationButton(app, text = ' accept' , fgcolor = ' black' , event = ' 1' ).pack(side = RIGHT , anchor = SE , padx = (5 ,10 ), pady = (0 ,5 ))
35
+ AnimationButton(app, text = ' cancel' , fgcolor = ' black' , event = ' 1' ).pack(side = RIGHT , anchor = SE , pady = (0 ,5 ))
36
+ ```
0 commit comments