質問編集履歴

5

コードの修正

2021/06/18 08:47

投稿

mmmiii313131
mmmiii313131

スコア3

test CHANGED
File without changes
test CHANGED
@@ -4,6 +4,50 @@
4
4
 
5
5
  ```python
6
6
 
7
+ from datetime import datetime
8
+
9
+ from logging import root
10
+
11
+ from os import kill
12
+
13
+ from stock_sns_project.chart_plot import ManiScreen
14
+
15
+ from kivy.uix.floatlayout import FloatLayout
16
+
17
+ from kivy.uix.layout import Layout
18
+
19
+ from kivy_garden.graph import Graph, MeshLinePlot
20
+
21
+ ##https://kivy-garden.github.io/graph/flower.html ↑
22
+
23
+ from kivy.app import App
24
+
25
+ from datetime import datetime
26
+
27
+ import sys
28
+
29
+ from numpy import right_shift, rint
30
+
31
+ from yahoo_finance_api2 import share
32
+
33
+ from yahoo_finance_api2.exceptions import YahooFinanceError
34
+
35
+ from datetime import datetime
36
+
37
+ from kivy.uix.scrollview import ScrollView
38
+
39
+ from kivy.app import runTouchApp
40
+
41
+ from kivy.uix.screenmanager import ScreenManager, Screen
42
+
43
+ from kivy.core.window import Window
44
+
45
+ from kivy.base import runTouchApp
46
+
47
+ from kivy.uix.label import Label
48
+
49
+ from kivy.uix.boxlayout import BoxLayout
50
+
7
51
 
8
52
 
9
53
  class Chart_plot(BoxLayout):

4

2021/06/18 08:47

投稿

mmmiii313131
mmmiii313131

スコア3

test CHANGED
File without changes
test CHANGED
@@ -466,18 +466,18 @@
466
466
 
467
467
 
468
468
 
469
+
470
+
471
+ #:kivy 2.0.0
472
+
473
+ Screen:
474
+
475
+
476
+
477
+
478
+
469
479
  <Screen>:
470
480
 
471
- #:kivy 2.0.0
472
-
473
- Screen:
474
-
475
-
476
-
477
-
478
-
479
- <Screen>:
480
-
481
481
  orientation: 'vertical'
482
482
 
483
483
  size: root.size

3

コードのダブり

2021/06/18 07:28

投稿

mmmiii313131
mmmiii313131

スコア3

test CHANGED
File without changes
test CHANGED
@@ -462,6 +462,12 @@
462
462
 
463
463
  ```kivy
464
464
 
465
+
466
+
467
+
468
+
469
+ <Screen>:
470
+
465
471
  #:kivy 2.0.0
466
472
 
467
473
  Screen:
@@ -472,16 +478,6 @@
472
478
 
473
479
  <Screen>:
474
480
 
475
- #:kivy 2.0.0
476
-
477
- Screen:
478
-
479
-
480
-
481
-
482
-
483
- <Screen>:
484
-
485
481
  orientation: 'vertical'
486
482
 
487
483
  size: root.size

2

簡単なコードで試してみた

2021/06/18 07:28

投稿

mmmiii313131
mmmiii313131

スコア3

test CHANGED
File without changes
test CHANGED
@@ -423,3 +423,83 @@
423
423
 
424
424
 
425
425
  ```
426
+
427
+
428
+
429
+ ### widgetを縦に並べただけのコード
430
+
431
+
432
+
433
+ 今書いてみましたが、うまく動作しませんでした。
434
+
435
+
436
+
437
+ ```python
438
+
439
+ from kivy.app import App
440
+
441
+ from kivy.uix.boxlayout import BoxLayout
442
+
443
+ from kivy.uix.label import Label
444
+
445
+
446
+
447
+ class Screen(BoxLayout):
448
+
449
+ pass
450
+
451
+
452
+
453
+ class chart2App(App):
454
+
455
+ pass
456
+
457
+
458
+
459
+ chart2App().run()
460
+
461
+ ```
462
+
463
+ ```kivy
464
+
465
+ #:kivy 2.0.0
466
+
467
+ Screen:
468
+
469
+
470
+
471
+
472
+
473
+ <Screen>:
474
+
475
+ #:kivy 2.0.0
476
+
477
+ Screen:
478
+
479
+
480
+
481
+
482
+
483
+ <Screen>:
484
+
485
+ orientation: 'vertical'
486
+
487
+ size: root.size
488
+
489
+ Label:
490
+
491
+ text: 'おはよう'
492
+
493
+
494
+
495
+ Button:
496
+
497
+ text: 'konnnitiha'
498
+
499
+
500
+
501
+ Button:
502
+
503
+ text: 'Hello, Python'
504
+
505
+ ```

1

コードの修正

2021/06/18 07:21

投稿

mmmiii313131
mmmiii313131

スコア3

test CHANGED
File without changes
test CHANGED
@@ -171,3 +171,255 @@
171
171
  こちらのページでファイルをインポートしてみてりしましたが、同じエラーが出てしまいます。
172
172
 
173
173
  解決策わかる方、どうかよろしくお願いします。
174
+
175
+
176
+
177
+
178
+
179
+ ### コード全体が滅茶苦茶だとのこと(;;)質問者からの依頼により、Buttonなどを並べたシンプルなコード載せます
180
+
181
+
182
+
183
+ ```python
184
+
185
+ from kivy.config import Config
186
+
187
+ Config.set('graphics', 'width', '640')
188
+
189
+ Config.set('graphics', 'height', '480')
190
+
191
+
192
+
193
+ from kivy.uix.textinput import TextInput
194
+
195
+ from kivy.app import App
196
+
197
+ from kivy.uix.widget import Widget
198
+
199
+ from kivy.uix.label import Label
200
+
201
+ from kivy.properties import StringProperty
202
+
203
+
204
+
205
+ from kivy.core.text import LabelBase, DEFAULT_FONT
206
+
207
+ from kivy.resources import resource_add_path
208
+
209
+
210
+
211
+ resource_add_path("font")
212
+
213
+ LabelBase.register(DEFAULT_FONT, "NotoSansJP-Regular.otf")
214
+
215
+ #LabelBase.register(DEFAULT_FONT, "Exo2-Regular.ttf")
216
+
217
+
218
+
219
+ from random import randint
220
+
221
+
222
+
223
+ #---------------------------------------
224
+
225
+
226
+
227
+ class ImageWidget(Widget):
228
+
229
+ def __init__(self, **kwargs):
230
+
231
+ super(ImageWidget, self).__init__(**kwargs)
232
+
233
+ pass
234
+
235
+
236
+
237
+ def login_ID(self):
238
+
239
+ pass
240
+
241
+
242
+
243
+ def login_PW(self):
244
+
245
+ pass
246
+
247
+
248
+
249
+ def login_button(self):
250
+
251
+ pass
252
+
253
+
254
+
255
+ class login_logonApp(App):
256
+
257
+ def __init__(self, **kawargs):
258
+
259
+ super(login_logonApp, self).__init__(**kawargs)
260
+
261
+ self.title = 'LoginLogon'
262
+
263
+
264
+
265
+ if __name__ == '__main__':
266
+
267
+ login_logonApp().run()
268
+
269
+
270
+
271
+ ```
272
+
273
+ ```kivy
274
+
275
+ #:kivy 2.0.0
276
+
277
+
278
+
279
+ ImageWidget:
280
+
281
+
282
+
283
+ <ImageWidget>:
284
+
285
+
286
+
287
+ canvas.before:
288
+
289
+ Color:
290
+
291
+ rgba: 1, 1, 1, 1
292
+
293
+ Rectangle:
294
+
295
+ pos: self.pos
296
+
297
+ size: self.size
298
+
299
+
300
+
301
+ BoxLayout:
302
+
303
+ orientation: 'vertical'
304
+
305
+ size: root.size
306
+
307
+
308
+
309
+ Label:
310
+
311
+ id: title_login
312
+
313
+ font_size: 50
314
+
315
+ text: 'VERBIN'
316
+
317
+ color: .100, .100, .100, .50
318
+
319
+ font_name: "Exo2-Regular.ttf"
320
+
321
+
322
+
323
+ BoxLayout:
324
+
325
+ orientation: 'vertical'
326
+
327
+ padding: 50, 20, 50, 30
328
+
329
+
330
+
331
+ Label:
332
+
333
+ id: user_id_label
334
+
335
+ font_size: 35
336
+
337
+ text: 'ID'
338
+
339
+ color: .3, .3, .3, .85
340
+
341
+ text_size: self.size
342
+
343
+ halign: 'left'
344
+
345
+ font_name: "Exo2-Regular.ttf"
346
+
347
+
348
+
349
+ TextInput:
350
+
351
+ id: user_id_input
352
+
353
+ font_size: 12
354
+
355
+ color: 0.6, 0.6, 0.6, 0.6
356
+
357
+ background_color: .2, .2, .35, .100
358
+
359
+
360
+
361
+ BoxLayout:
362
+
363
+ orientation: 'vertical'
364
+
365
+ padding: 50, 0, 50, 22
366
+
367
+ Label:
368
+
369
+ id: user_PW_label
370
+
371
+ font_size: 35
372
+
373
+ text: 'PassWord'
374
+
375
+ color: .3, .3, .3, .85
376
+
377
+ text_size: self.size
378
+
379
+ halign: 'left'
380
+
381
+ font_name: "Exo2-Regular.ttf"
382
+
383
+
384
+
385
+ TextInput:
386
+
387
+ id: user_PW_input
388
+
389
+ font_size: 12
390
+
391
+ color: .40, .40, .40, .40
392
+
393
+ background_color: .2, .2, .35, .100
394
+
395
+
396
+
397
+ Button:
398
+
399
+ text: '会員登録がまだの方'
400
+
401
+ font_size: 10
402
+
403
+ background_normal: ''
404
+
405
+ color: .1, .3, .30, .40
406
+
407
+
408
+
409
+ Button:
410
+
411
+ text: 'LOGIN'
412
+
413
+ background_normal: ''
414
+
415
+ background_color: 1, .3, .4, .85
416
+
417
+ font_size: 50
418
+
419
+ font_name: "Exo2-Regular.ttf"
420
+
421
+
422
+
423
+
424
+
425
+ ```