TomSchimansky / TkinterMapView

A python Tkinter widget to display tile based maps like OpenStreetMap or Google Satellite Images.
Creative Commons Zero v1.0 Universal
615 stars 86 forks source link

Progressbar is not moving if using inside of a class #97

Closed oldwizard1010 closed 1 year ago

oldwizard1010 commented 1 year ago

example code:


from customtkinter import (CTk, CTkButton, CTkProgressBar)
class NewprojectApp:
    def __init__(self, master=None):
        # build ui
        self.ctk1 = CTk(None)
        self.ctkprogressbar1 = CTkProgressBar(self.ctk1)
        self.ctkprogressbar1.pack(side="top")
        self.ctkbutton1 = CTkButton(self.ctk1)
        self.ctkbutton1.configure(text='ctkbutton1')
        self.ctkbutton1.pack(side="top")
        self.ctkbutton1.configure(command=self.moveProgressbar)
        # Main widget
        self.mainwindow = self.ctk1
    def run(self):
        self.mainwindow.mainloop()
    def moveProgressbar(self):
        self.ctkprogressbar1.step()
        pass
if __name__ == "__main__":
    app = NewprojectApp()
    app.run()