Python Forum
[Kivy] Create buttons as many as there is data
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Kivy] Create buttons as many as there is data
#1
Hi, with this code I create a graphical interface with a button
from kivymd.app import MDApp
from kivy.lang import Builder

KV = """
Screen:

    MDRectangleFlatButton:
        text: "Hello Kivy World!"
        pos_hint: {"center_x": 0.5, "center_y": 0.5}
"""


class MainApp(MDApp):

    def build(self):
        self.title = "Hello Kivy"
        self.theme_cls.theme_style = "Dark"
        self.theme_cls.primary_palette = "Red"
        return Builder.load_string(KV)


MainApp().run()
however the application takes the data from the bees of a website so I would like to create as many buttons as the extracted data for example if the application extracts 5 data it must create 5 buttons if it extracts 8 data it must create 8 buttons and in the text of each button must put the extracted data, is it possible to do something like this?
thank you
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] How do you create buttons and what is or how does super work? Fox_cutter12 2 2,989 May-10-2018, 08:14 PM
Last Post: notreallyapro

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020