为什么我的Kivy标签不能从Python正确更新?

2024-06-26 02:09:03 发布

您现在位置:Python中文网/ 问答频道 /正文

为什么这不更新我的号码

        MDRectangleFlatButton:
            text: "Cancel"
            text_color: 0, 0, 1, 1
            md_bg_color: 1, 1, 0, 1
            on_release:
                app.root.current = "main"
                app.testingUpdate()
                root.manager.transition.direction = "down"
class ClosestWeek(Screen):
    def updateQuantity(self):
        self.ids.nyStripOne.subtexttwo = database.quantitySheet.acell('B17').value

class SecondWeek(Screen):
    def updateQuantity(self):
        self.ids.nyStripOne.subtexttwo = database.quantitySheet.acell('B17').value
class WassiDryAge(MDApp):
    def build(self):
        kv = Builder.load_file("screens.kv")
        return kv
    database.Quantity()
    cw = ClosestWeek.updateQuantity
    sw = ClosestWeek.updateQuantity    
    stripQuantity = database.quantitySheet.acell('B17').value
    
    def testingUpdate(self):
        self.cw
        self.sw

https://gyazo.com/f4cd065bd20a7f49cf7f35dd91a6fd2c

这是工作时,我调用一个,但我需要一次更新多个页面

我想不出有什么能让这一切顺利进行:(


Tags: textselfappvaluedefrootdatabaseclass