added most of immo invest fields, layout still crap

This commit is contained in:
Tobias Kurze
2020-09-15 16:20:30 +02:00
parent cbb41e481e
commit 30163cb368
2 changed files with 170 additions and 21 deletions

View File

@@ -50,14 +50,25 @@ class ImmoApp(App):
def build(self):
self.title = 'hello world'
Clock.schedule_interval(self._update_clock, 1 / 60.)
self.root.ids.per_qm.text = "iaeiae"
def _update_clock(self, dt):
self.time = time()
def _update_cost_qm(self):
surface = float('0' + self.root.ids.surface.text)
price = int('0' + self.root.ids.price.text)
if surface is not None and surface > 0 and price is not None and price > 0:
self.root.ids.per_qm.text = (str(price / surface))
def on_text(self, args):
# print('The widget', instance, 'have:', value)
print(args[1])
# exit()
text_input = args[0]
print(text_input.name)
if text_input.name in ["price", "surface"]:
self._update_cost_qm()
if __name__ == '__main__':