Git Product home page Git Product logo

Comments (3)

alejandroautalan avatar alejandroautalan commented on June 3, 2024

Hello @YiQinHuili, thanks for your comments.
I will try to focus on this when I finish the customtkinter integration (in a few weeks)

Thanks again for your work - you are making our life much easier!

I'm glad that pygubu is helpful for you!

Regards
Alejandro A.

from pygubu.

BloodyRain2k avatar BloodyRain2k commented on June 3, 2024

@YiQinHuili are you referring to this name field?
image
If that's the case, this field is using the ui file's name, along with some simple casing logic.

I've been looking into keeping that name too without relying on the ui file's name, but I didn't get very far yet.

Mostly because I settled on a work around to avoid needing the "Code" tab on every change:
After I generate the initial UI, I generate the "App" code and save it in a separate .py file, usually <ProjectName>_Tk.py.
Then I reference the class from that file in the actual project's .py file and run it from there.
At this point I only need to make changes to the ui and ctrl+s to update the .ui file.

This should work in your case too, if you give your dialog a custom id. You can then access the dialog through the mainwindow's .builder:
image
In my case I have a tk.Frame named entry, which I intended to use as a blueprint for an instancing experiement, so I had to set the master manually to a new tkinter.TopLevel because it's just a tk.Frame, but in your case that might not be needed.

With this setup you rarely need to touch the "Code" tab as the builder has everything it needs in the .ui file. Maybe that helps as a work around for you too, until we've got some connection between toplevel elements and the names we gave them.

PS: don't be confused if the "App" code you generate might look different, I'm running modified versions of both the designer and builder.

from pygubu.

alejandroautalan avatar alejandroautalan commented on June 3, 2024

Hi Alejandroautalan,

Thank you very much for the fantastic tool! After reviewing a number of tools I decided to use pygubu for my project - I found it the best in terms of ease to use, rich in feature and flexible.

I use it by generating the code script, sub-classing the generated class and overriding the call back functions - so that the automatically generated code and my hand writing code are completely separated. It worked perfectly until I decided to create a second top-level window - a simple dialog.

What is bothering me is that I have to re-type the class name every time I need to re-generate and save the code script. Could you please add the class name as an property in the "Appearance" panel, for example, under "id", and use it to generate the code?

Thanks again for your work - you are making our life much easier!

Project settings are now saved in the ui file, and used for code generation using the inheritance approach.
Fixed in v0.35

from pygubu.

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.