Need help in figuring out code that will allow me to search something in the textinput and have all items that match the search appear in the boxlayout. I have only just started kivy (3 days ago).
main.py
# import kivy & functions/widgets.
import kivy
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.widget import Widget
from kivy.uix.button import Button
from kivy.uix.textinput import TextInput
# import kivy layouts.
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.stacklayout import StackLayout
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.gridlayout import GridLayout
# Specify version or kivy needed.
kivy.require("1.10.1")
class Page(FloatLayout):
pass
class YuGiOhApp(App):
def build(self):
return Page()
YuGiOhApp().run()
i dont know how many of the imports i need just kinda left them there from when i was playing around with kivy.
YuGiOh.kv
#:kivy 1.10.1
<TestButton@Button>:
width: 177
height: 254
size_hint: None, None
background_normal: "pics/32864.jpg"
<FloatLayout>:
id: searchpage
display: entry
Button:
id: searchbutton
size_hint: 0.20, 0.10
pos_hint: {"x": 0.60, "top": 1}
text: "search"
Button:
id: collectionbutton
size_hint: 0.20, 0.10
pos_hint: {"x": 0.80, "top": 1}
text: "collection"
TextInput:
id: entry
multiline: False
font_size: 48
size_hint: 0.60, 0.10
pos_hint: {"x": 0, "top": 1}
ScrollView:
size_hint: 0.60, 0.90
StackLayout:
orientation: "lr-tb"
pos_hint: {"x": 0, "top": 0.88}
size_hint: 1, None
height: self.minimum_height
padding: 5
spacing: 5
TestButton:
TestButton:
TestButton:
TestButton:
TestButton:
TestButton:
TestButton:
TestButton:
TestButton:
TestButton:
TestButton:
TestButton:
My kivy code so far.