Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview of CustomTkinter (CTk) not working #192

Open
SiL3NC3 opened this issue Feb 17, 2023 · 3 comments
Open

Preview of CustomTkinter (CTk) not working #192

SiL3NC3 opened this issue Feb 17, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@SiL3NC3
Copy link

SiL3NC3 commented Feb 17, 2023

Describe the bug
When starting a Preview (F5), it is not coming up.

To Reproduce
Steps to reproduce the behavior:

  1. Add a "CTk" widget
  2. Press "F5" >> nothing happens
  3. Add a "CTkToplevel" widget
  4. Press "F5" >> Preview window pops up, as expected

Expected behavior
Preview should also be working with CTk. ;)

Your Environment (please complete the following information):

  • OS: Windows 10
  • Python version: Python 3.9.7
  • Pygubu version: pygubu 0.29
  • Designer version: pygubu-designer 0.34

Additional context
Just a hint, add a button to the about dialog to copy out these info for bug reports.
Is always a good feature. ;)

@alejandroautalan
Copy link
Owner

Hello @SiL3NC3, thanks for the report.

It seems to happen on windows OS. On Linux the screen is shown but with some errors in the background.

F5 preview is trying to execute the real code (and not fake previews like the design window).
The problem here is that Ctk is another Tk window, with its own TCL interpreter running on background, and some things get not initialized for customtkinter.

I will try to figure out how to display the preview correctly.

Regards

@alejandroautalan alejandroautalan added the bug Something isn't working label Feb 17, 2023
@alejandroautalan
Copy link
Owner

I found a workaround, make sure you have checked "Center toplevel preview window" option in preferences dialog.

2023-02-18_22-48

Note that, if you see the preview, some issues will still happen because of the problem described above,
For example, images might not be visible on the preview.

Try it and let me know.

Regards
Alejandro A.

@SiL3NC3
Copy link
Author

SiL3NC3 commented Feb 19, 2023

Yes, with the above setting the preview is coming up and images are missing.
Just a label text is shown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants