Skip to main content
Bram Hoekstra
Inspiring
July 12, 2021
Answered

Create script elements on button click?

  • July 12, 2021
  • 1 reply
  • 376 views

I wan't to create a new panel and 2 buttons when a button is clicked, but I just can't figure out why the code I have so far doesn't work.

 

Can somebody help me out?

This topic has been closed for replies.
Correct answer Mylenium

If I remeber correctly you have to define the layouts already at the start and then only show/ hide them. They cannot appear in nested functions because they need to register right at the start of the script. There's several threads on this as it also pertains to changing icons and button lables dynamically. Spending a bit of time with a search may dig them up.

 

Mylenium

1 reply

Mylenium
MyleniumCorrect answer
Legend
July 13, 2021

If I remeber correctly you have to define the layouts already at the start and then only show/ hide them. They cannot appear in nested functions because they need to register right at the start of the script. There's several threads on this as it also pertains to changing icons and button lables dynamically. Spending a bit of time with a search may dig them up.

 

Mylenium