-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyy.kv
156 lines (122 loc) · 2.89 KB
/
myy.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# How to use images in kivy using .kv
# root widget od Imagekv Calss
<LoadDialog>:
BoxLayout:
size: root.size
pos: root.pos
orientation: "vertical"
FileChooserListView:
id: filechooser
BoxLayout:
size_hint_y: None
height: 30
Button:
text: "Cancel"
on_release: root.cancel()
Button:
text: "Load"
on_release: root.load(filechooser.path, filechooser.selection)
<Imagekv>:
# Giving orentation to Box Layout
orientation:'vertical'
###############################################
# Adding Box Layoyt
BoxLayout:
padding:5
# Adding image from the system
Image:
source: 'download.jpg'
# Giving the size of image
size_hint_x: 0.4
# allow sterching of image
allow_stretch: True
# Giving Label to images
Button:
text:"Import picture"
font_size:11
bold:True
on_release: root.show_load()
Label:
text:"Programing Language"
font_size:10
###############################################
# Drawing the line between the multiples
Label:
canvas.before:
Color:
rgba: (1, 1, 1, 1)
Rectangle:
size: self.size
pos: self.pos
size_hint_y: None
height: 1
################################################
# Another Box Layout
BoxLayout:
padding:5
Image:
source:"downloadimg.jpg"
size_hint_x: 0.4
allow_stretch: True
Label:
text:"Image"
font_size:11
bold:True
Label:
text:"Python Image"
font_size:10
#############################################
# Drawing the line between the multiples
Label:
canvas.before:
Color:
rgba: (1, 1, 1, 1)
Rectangle:
size: self.size
pos: self.pos
size_hint_y: None
height: 1
###############################################
# Adding next Box Layout
BoxLayout:
padding:5
# To load an image asynchronously
# (for example from an external webserver)
AsyncImage:
source: 'http://kivy.org/logos/kivy-logo-black-64.png'
width: 100
allow_stretch: True
Label:
text:" Asynchronous Image "
font_size:11
bold:True
Label:
text:"Kivy Logo"
font_size:10
####################################################
# Drawing the line between the multiples
Label:
canvas.before:
Color:
rgba: (1, 1, 1, 1)
Rectangle:
size: self.size
pos: self.pos
size_hint_y: None
height: 1
#####################################################
# LAst Box Layout
BoxLayout:
padding:5
AsyncImage:
size_hint_y: None
source: 'http://kivy.org/slides/kivypictures-thumb.jpg'
width: 100
allow_stretch: True
Label:
text:"Asynchronous Image "
font_size:11
bold:True
Label:
text:" Webserver image "
font_size:10