Add a button with IDE Script

As a matter of introduction, I wanted to add Controls in a window using IDE Script.

So, I fired Xojo 2015r1, read the docs and saw… well… try the last version Emile, this one is 7 years old.

I do it right now, and…

How do I add a OK button, place it at 400,400 (or anywhere), change button to PB_OK, etc. And, eventually add code to it ?

After all scripting the IDE is doing that (and more, say add Properties, Methods, Functions, Menus…).

Is this possible right now ?

Xojo did a blog post on that: Simplified: Adding User Interface Controls at Runtime – Xojo Programming Blog

Thank you @Mark_Sweeney.

I will read that when alone in the afternoon.

I checked with the Recorder and it failed (like the 9 years old Xojo)… only add “name of the control” and no parameter: and when I asked to execute, nothing was done.

I do not think at the blog / do not saw an entry on the LR about the Blog.

I do not saw anything about IDE Script in the Blog entry. Are-you sure this answer the question ?