I am trying to create a custom template that has the functionality of a generic button.
I have a certain style which has been set using a ButtonStyle dataset tag that gets bound to my button.
The last piece of the puzzle to make my template truly customizable is to somehow pass through a script as a custom property.
Is there anyway to do this? I’ve created a string custom property on by template called “Script”. But simply referencing this property in the scripting of my button with:
doesn’t work at all.
I tried a workaround where i would add as script to the template once i’ve added it to a window. However it only executes when i click on an area of the template NOT taken up by the button. If i click directly on the button, then the script inside the template is executed.