Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have this button below that supposed to run a function called 'addList' which should add new list into the screen every times it was clicked, and it works on first click but then when I tried to press the button on second try the button won't work and isn't clickable.

self._addButton = MDRaisedButton(text="Upload File",
                                size_hint=(.4,.04),
                                pos_hint={'center_x':.2},
                                valign='bottom',
                                font_size="16sp",
                                md_bg_color="#121212",
                                on_release=self.addList)


What I have tried:

<pre>    def addList(self, _Obj):
        _sv = ScrollView()
        MainlistView = MDList()
        AddUser_item = TwoLineListItem(text="File 1",secondary_text="2/4/2022")
        MainlistView.add_widget(AddUser_item)
        _sv.add_widget(MainlistView)
        self.screen.add_widget(_sv)
Posted
Updated 13-Nov-22 1:36am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900