change the label widget on the header of dt_gui_collapsible_section_t

Not sure if this is best place to ask this question.

Is there a simple way to change the label widget on the header of dt_gui_collapsible_section_t created by dt_gui_new_collapsible_section()? Or should I just throw it way and rebuild the whole section again.

I want the label value to change based on a menu option in my module.

I am not sure if I understand your question here. But when I use a preset for a module the preset name is shown in the modules title line.

image

Possibly more knowledgeable people on the forum can better answer your question but they would probably want to know your OS and version of DT. A screen shot of the problem may help them as well. Good luck resolving your issue.

I think he is referring to a gui element created by calling the associated lua api method.
I cannot find nothing in the documentation though.

Yep, the C++ code. Developing a new module, wasn’t really sure where to ask. Probably simpler to rebuild the widget. Getting a reference to the label widget was doing my head in.

So not related to the lua api after all.

I think you should checkout gtk.c in dt src code.
There is a method dt_gui_update_collapsible_section() that might fullfill your needs.
But I’m not very familiar with C++ code so you may want to place your question on github.

Been through all that. There is no obvious way to change the widget with the label (to me), and it not currently done in darktable for any collapse section that I could find. The widget I want a reference to is buried in there. Not to worry, I will throw away the collapse section and rebuild it, when I want to change the label. I wasn’t really sure where to post. I did chat on the developer IRC before.