Skip to content
Advertisement

How to send Only Selected value to another screen in KivyMD?

output KivyMD Programmers, im new in KivyMD….

on_start() list items are sucessfully showing and on_press sending a selected value too passValue() function….

but here now i wants open new Screen under passValue() function…and pass variable value’s to new Screen….

JavaScript

Advertisement

Answer

Since It’s not clear exactly where in your screen Bye you want some variable to be passed, let’s suppose you want to pass a list’s text to the MDLabel having text ‘Good Bye’ of the screen Bye by method passValue.

You may achieve this as follows:

First in the kvlang of screen Bye assign an id say, target to the MDLabel,

JavaScript

Then in your method passValue,

JavaScript

As a side note you perhaps don’t need (as you already defined that in kvlang) the following:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement