Click here to Skip to main content
15,846,144 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to show a popup window with a countdown timer. I have the popup window showing but cant access widgets inside of it while it is open.

From code
App.get_running_app().ids.labUSB.text= "Pathfound"
gives an error and I dont think this is correct way anyway.

Any help please?

class USBPopup(Popup):
    if os.path.ismount(logDir):
        #App.get_running_app().ids.labUSB.text= "Pathfound"
        print("Pathfound")
    else:
        print("Path not found")
    pass


kv file

<USBPopup>:
    labUSB: labUSB
    
    size_hint: .5, .5
    auto_dismiss: False

    #border: (5, 5, 5, 5)
    title: ""                 # <<<<<<<<
    separator_height: 0       # <<<<<<<<
    GridLayout:
        cols: 1
        size: root.width, root.height
        MyTLab:
            text: "Copying log file to USB ..."
            underline: True
            background_color: 1, 1, 1, 1
        MyTLab:
            id:labUSB
            text: "please wait ..."
            underline: True
            background_color: 1, 1, 1, 1
        MyBut:
            text: "Close"
            font_size: 20
            size_hint: .2, .8
            on_press: root.dismiss()


What I have tried:

as above - Need to change labUSB.text while Popup is open.
Posted
Updated 22-May-20 6:00am

1 solution

That's not an equality operator - it is assignment. This is just for testing. I need to change value of labUSB but it is giving error because it is in Popup class I think.
 
Share this answer
 
Comments
Richard MacCutchan 22-May-20 11:36am    
Maybe if you told us what the error is we could offer some suggestions.

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