I have used AddControl to place buttons in a window based on a button that exists in the window. The existing button has code in the Pressed event → MakeText(Me). MakeText reports the button’s Name, Caption, And Left properties.
Everything looks OK in the window, but all of the buttons report the properties of the last added button instead of their own properties.
The example project shows this effect when using Me and from the File menu using ControlAt.
I have seen the example of adding controls using container.AddControl.
Is there a way using window.AddControl?
AddControl.zip (6.5 KB)