alejandroautalan / pygubu-designer

A simple GUI designer for the python tkinter module
GNU General Public License v3.0
803 stars 98 forks source link

Custom properties not showing #63

Closed jrezai closed 2 years ago

jrezai commented 2 years ago

I've noticed that the 'Custom' section no longer shows for some widgets, such as the Calendar (including my own custom widgets). Is it just me or is it happening for anyone else too?

Here is an example: 1 2

I'm using: python: 3.8.10 on linux pygubu: 0.16 pygubu-designer: 0.21

alejandroautalan commented 2 years ago

Hello @jrezai thanks for the bug report. I recently added a new function register_custom_property to make easy the registration of custom properties. This will help in future widget plugins that I'm working on.

https://github.com/alejandroautalan/pygubu/blob/6d20b6cdcb0793b427e93fe1910c075c5d31dd19/pygubu/builder/builderobject.py#L95-L115

If you have custom widgets, please update the code to use the new function. Here is an example:

https://github.com/alejandroautalan/pygubu/blob/6d20b6cdcb0793b427e93fe1910c075c5d31dd19/pygubu/builder/widgets/calendarframe.py#L2-L46

Please install the latest version and let me know. Regards Alejandro A.

jrezai commented 2 years ago

Thank you Alejandro!

I remember seeing register_custom_property before but I wasn't sure what arguments to pass to it. The example link you provided was perfect.

I just used that new function for one of my widgets and the properties came up fine in Pygubu Designer. That new function is easier to use than register_property too (after seeing an example), it's great!

The calendar widget also has custom properties showing for it again too.

Thanks again @alejandroautalan !