What I need to do is output to maybe a label below the submit button right now it prints to console can anyone tell me the code to do this ???
import kivy
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.gridlayout import GridLayout
from kivy.uix.textinput import TextInput
from kivy.uix.button import Button
class MyGrid(GridLayout):
def __init__(self, **kwargs):
super(MyGrid, self).__init__(**kwargs)
self.cols = 1
self.inside = GridLayout()
self.inside.cols = 1
self.inside.add_widget(Label(text="Sale Price: ", font_size=100))
self.name = TextInput(input_filter="int", multiline=False, font_size=150)
self.inside.add_widget(self.name)
self.add_widget(self.inside)
self.submit = Button(text="Run the Numbers", font_size=100)
self.submit.bind(on_press=self.pressed)
self.add_widget(self.submit)
def pressed(self, instance):
name = int(self.name.text)
calc = name * .0975
tax = name + calc
#######first franklin#########
#######6 months#######
a = tax * .06
b = tax + a
c = b / 6
######12 months#####
d = tax * .08
e = tax + d
f = e / 12
######24 months####
g = tax * .15
h = tax + g
i = h / 24
########Synchrony########
#####24 months 0#####
j = tax * .14
k = tax + j
l = k / 24
#####36 months 0#####
m = tax * .18
n = tax + m
o = n / 36
#####24 months 0#####
p = tax * .14
q = tax + p
r = q / 48
#####6 months deffered#####
p = tax * .14
q = tax + p
r = q / 48
print("First Franklin Loans")
print(c, "for 6 months total cost:", b)
print(f, "for 12 months total cost:", e)
print(i, "for 24 months total cost:", h)
print(" ")
print("Synchrony Loans")
print("Deferred Interest Loans")
print("deferred for 6 months total cost")
print("deferred for 12 months total cost")
print("deferred for 18 months total cost")
print("No Interest loans")
print(l, "for 24 months total cost:", k)
print(o, "for 36 months total cost:", n)
print(r, "for 48 months total cost:", q)
self.name.text = ""
class MyApp(App):
def build(self):
return MyGrid()
if __name__ == "__main__":
MyApp().run()
just either print to label below or a pop up window with new data in it. wouldnt let me post unless I added more to it. there is nothing else I can think to ask so please ignore this section of the post its only so I can get it to post