Git Product home page Git Product logo

Comments (7)

h4xw4r avatar h4xw4r commented on May 22, 2024

It has nothing to do with pyglet.
I have the same problem without using pyglet. Try just using tkinter, os and customtkinter and the problem is still there
This happened after I updated my customtkinter to latest version.

from customtkinter.

TomSchimansky avatar TomSchimansky commented on May 22, 2024

What OS are you using and how are you creating the askdirectory? I will look into this tomorrow...

from customtkinter.

h4xw4r avatar h4xw4r commented on May 22, 2024

I'm on Windows 10 Home
this is a cleaned up version of my code

        from tkinter.constants import CENTER, LEFT
        import tkinter
        import tkinter.messagebox
        from tkinter import filedialog as fd 
        import customtkinter  # <- import the CustomTkinter module
        import os

        class App(customtkinter.CTk):
            customtkinter.set_appearance_mode("dark")
            APP_NAME = "Bulk Barcode Generator"
            WIDTH = 600
            HEIGHT = 450

            MAIN_COLOR = "#5ea886"
            MAIN_COLOR_DARK = "#2D5862"
            MAIN_HOVER = "#05f4b7"


            def __init__(self, *args, **kwargs):
                super().__init__(*args, **kwargs)

                self.title(App.APP_NAME)
                self.geometry(str(App.WIDTH) + "x" + str(App.HEIGHT))
                self.minsize(App.WIDTH, App.HEIGHT)

                self.protocol("WM_DELETE_WINDOW", self.on_closing)
                # ============ create two CTkFrames ============

                #1
                self.frame_left = customtkinter.CTkFrame(master=self,
                                                        width=220,
                                                        height=App.HEIGHT-40,
                                                        corner_radius=5)
                self.frame_left.place(relx=0.38, rely=0.5, anchor=tkinter.E)

                #2
                self.frame_right = customtkinter.CTkFrame(master=self,
                                                        width=350,
                                                        height=App.HEIGHT-40,
                                                        corner_radius=5)
                self.frame_right.place(relx=0.40, rely=0.5, anchor=tkinter.W)

        #        # ============ frame_right ============

                self.button_output = customtkinter.CTkButton(master=self.frame_right, border_color=App.MAIN_COLOR,
                                                        fg_color=None, hover_color=App.MAIN_HOVER,
                                                        height=28, text="Output Folder", command=self.button_outputFunc,
                                                        border_width=3, corner_radius=10, text_font=('Calibri',16))
                self.button_output.place(relx=0.05, rely=0.06, anchor=tkinter.NW)
                self.entry_output = customtkinter.CTkEntry(master=self.frame_right, width=320, height=38, corner_radius=5)
                self.entry_output.place(relx=0.05, rely=0.18, anchor=tkinter.NW)


            def button_outputFunc(self):
                self.entry_output.delete(0, 'end')
                filename = fd.askdirectory()
                self.entry_output.insert(0,str(filename))
                pass

            def on_closing(self, event=0):
                self.destroy()

            def start(self):
                self.mainloop()




        if __name__ == "__main__":
            app = App()
            app.start()

edit: no idea how to add code block

from customtkinter.

ertucode avatar ertucode commented on May 22, 2024

@h4xw4r I am not actually using pyglet, I said that because customtkinter itself is using it.
I am on Windows 10 Home also.

from customtkinter.

h4xw4r avatar h4xw4r commented on May 22, 2024

@ertucode My bad, you are right İ come realize that later.

from customtkinter.

TomSchimansky avatar TomSchimansky commented on May 22, 2024

I don't know what exactly is causing the problem, but now I removed pyglet from CustomTkinter and the dialogs should work fine. I uploaded version 3.9 to pip, maybe you can report if it's now working for you, or if there are any errors. Because now I load the necessary fonts with a custom function, which was done by pyglet before. And I only tested it on two Windows machines (Windows 10, 11).

from customtkinter.

h4xw4r avatar h4xw4r commented on May 22, 2024

Thanks a lot, works just fine now.

from customtkinter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.