/// <summary> /// Creates a new ControlHost instance and adds it to the flowchart. /// </summary> /// <param name="x">Horizontal position of the ControlHost.</param> /// <param name="y">Vertical position of the ControlHost.</param> /// <param name="width">Width of the ControlHost.</param> /// <param name="height">Height of the ControlHost.</param> /// <returns>A reference to the new ControlHost.</returns> public ControlHost CreateControlHost(float x, float y, float width, float height) { ControlHost newHost = new ControlHost(this); newHost.setPos(x, y, width, height); newHost.updateControlPosition(); Add(newHost, SelectAfterCreate); return newHost; }