on_text_validate runs function twice

10 views
Skip to first unread message

Simon Lindebjerg

unread,
Apr 25, 2017, 2:14:06 AM4/25/17
to Kivy users support
Hi

I'm having a problem with a dynamically created button that's showing up twice

How can I make that stop?

This textinput from the .kv file
TextInput:
    id: addToGroup
    hint_text: 'Start typing a group name'
    on_text_validate: root.gList(self.text, groupBox)

Calls this function
class UserScreen(Screen) :
    def gList(self, input, layout) : #input and layout parameters to assign text and placement
        layout.add_widget(UserScreen.Select())

    class Select(BoxLayout) :
        pass

Which creates this twice
<Select>
    font_name:"OpenSans-Regular"
    Button:
        id: btnOne
        text: "This is text"
        valign: "center"

ZenCODE

unread,
Apr 25, 2017, 4:27:28 AM4/25/17
to Kivy users support
Is it not possible that the text is being changed again? Please try creating a minimal, runnable example that demonstrates the issue. It's the only way we can verify the problem is not somewhere in your code...
Reply all
Reply to author
Forward
0 new messages