質問編集履歴
2
整合性をとりました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -248,13 +248,13 @@
|
|
248
248
|
|
249
249
|
|
250
250
|
|
251
|
-
class Row(BoxLayout):
|
251
|
+
# class Row(BoxLayout):
|
252
|
-
|
252
|
+
|
253
|
-
is_checked = BooleanProperty(False)
|
253
|
+
# is_checked = BooleanProperty(False)
|
254
|
-
|
254
|
+
|
255
|
-
id = StringProperty()
|
255
|
+
# id = StringProperty()
|
256
|
-
|
256
|
+
|
257
|
-
permission = StringProperty()
|
257
|
+
# permission = StringProperty()
|
258
258
|
|
259
259
|
|
260
260
|
|
1
pyファイルを追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -140,7 +140,7 @@
|
|
140
140
|
|
141
141
|
size_hint: None, None
|
142
142
|
|
143
|
-
|
143
|
+
on_press: root.delete(num,a) # 押下時に表中でチェックの入った行を削除したい
|
144
144
|
|
145
145
|
|
146
146
|
|
@@ -178,6 +178,120 @@
|
|
178
178
|
|
179
179
|
|
180
180
|
|
181
|
+
```python
|
182
|
+
|
183
|
+
from kivy.app import App
|
184
|
+
|
185
|
+
from kivy.config import Config
|
186
|
+
|
187
|
+
from kivy.lang import Builder
|
188
|
+
|
189
|
+
from kivy.uix.screenmanager import ScreenManager, Screen, NoTransition
|
190
|
+
|
191
|
+
from kivy.uix.boxlayout import BoxLayout
|
192
|
+
|
193
|
+
from kivy.properties import StringProperty, ObjectProperty, BooleanProperty
|
194
|
+
|
195
|
+
from kivy.core.text import LabelBase, DEFAULT_FONT
|
196
|
+
|
197
|
+
from kivy.resources import resource_add_path
|
198
|
+
|
199
|
+
Config.set('graphics', 'width', '800')
|
200
|
+
|
201
|
+
Config.set('graphics', 'height', '600')
|
202
|
+
|
203
|
+
Config.set('input', 'mouse', 'mouse,disable_multitouch') # 右クリック赤丸消去
|
204
|
+
|
205
|
+
Config.set('kivy', 'exit_on_escape', '0') # kivy ESC無効化
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
# Path of Fonts
|
210
|
+
|
211
|
+
resource_add_path('/usr/share/fonts/truetype/takao-gothic')
|
212
|
+
|
213
|
+
LabelBase.register(DEFAULT_FONT, 'TakaoGothic.ttf') # 日本語が使用できるように日本語フォントを指定する
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
# Path of KV_Lang
|
218
|
+
|
219
|
+
Builder.load_file("./Account_for_teratail.kv")
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
# Setting Screen
|
224
|
+
|
225
|
+
SM = ScreenManager(transition=NoTransition())
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
class Manager(Screen):
|
232
|
+
|
233
|
+
rv = ObjectProperty()
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
def on_enter(self):
|
238
|
+
|
239
|
+
self.rv.data = [{'data': ("000000", "manager", "pass")}]
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
def delete(self, id, per):
|
244
|
+
|
245
|
+
print(id, per)
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
class Row(BoxLayout):
|
252
|
+
|
253
|
+
is_checked = BooleanProperty(False)
|
254
|
+
|
255
|
+
id = StringProperty()
|
256
|
+
|
257
|
+
permission = StringProperty()
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
class GUIApp(App):
|
264
|
+
|
265
|
+
"""
|
266
|
+
|
267
|
+
実行クラス
|
268
|
+
|
269
|
+
"""
|
270
|
+
|
271
|
+
def build(self):
|
272
|
+
|
273
|
+
SM.add_widget(Manager(name="manager"))
|
274
|
+
|
275
|
+
self.title = 'アカウント管理ソフト'
|
276
|
+
|
277
|
+
return SM
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
if __name__ == '__main__':
|
284
|
+
|
285
|
+
GUIApp().run()
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
```
|
292
|
+
|
293
|
+
|
294
|
+
|
181
295
|
###備考
|
182
296
|
|
183
297
|
python: 3.4.2
|