added most of immo invest fields, layout still crap
This commit is contained in:
15
immo_gui.py
15
immo_gui.py
@@ -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__':
|
||||
|
||||
Reference in New Issue
Block a user