Comments (3)
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.
@YiQinHuili are you referring to this name field?
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
:
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.
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)
- Run executable file by pyinstaller generated, the erroe showed “ModuleNotFoundError: No module named 'Notebook'” HOT 7
- My picture won't load HOT 3
- i want to change text color with a funtion but it doesn't work HOT 2
- no module pygubu on m1 Macbook Pro HOT 3
- Trying to run functions from other classes on XML file HOT 1
- Can I move all widgets assigned to a row down one row? HOT 3
- Tag Issue when packaging HOT 2
- Enhancement suggestion for pathchooserwidget
- Address editabletreeview directly :enhancement: HOT 5
- Bindings callbacks with underscore are not called HOT 2
- Allow to setup values for option database after first window created.
- The environment of Python 3.11 is externally managed by default. HOT 4
- TkScrolledFrame.configure() doesn't return
- CRITICAL BUG: AttributeError: module 'pygubu' has no attribute 'Builder' HOT 2
- All widgets show no appearance or layout properties.
- The anchor property does not function when defined in xml HOT 2
- Not all CTk arguments are exposed by pugubu HOT 1
- Scrolled frame doesn't resize in grid layout HOT 3
- Not a bug, just advising that the 'Glade' link is dead at the start if the README.md, and providing new URL HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygubu.