PControl Class

PControl is a wrapper around a System.Windows.Forms.Control.

For a list of all members of this type, see PControl Members.


public class PControl : PNode

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.


This class provides a mechanism for adding standard controls to the piccolo scene graph, with some limitations. When a PControl's Editing property is set to true, the underlying control is added to the specified canvas and treated as a normal windows component. However, when the Editing property is set to false, the control is rendered as an image. Typically, you will want to turn off editing while the user is zooming or panning the camera and turn editing back on when the user is ready to interact with the control.

The underlying control's "natural size" or the actual bounds of the control is equivalent to the bounds of the node at 100% scale. So, setting the bounds of PControl will directly set the bounds of the underlying control. Typically, you will use PControl nodes in conjunction with PControlEventHandler, which only allows a PControl node to be editable when it is displayed at its natural size.

The CurrentCanvas property indicates which canvas will display the editable control when editing is turned on. All other canvases will display an image. This is necessary since an instance of a control cannot be added to a canvas more than once or to more than one canvas.


Namespace: UMD.HCIL.PiccoloX.Nodes

Assembly: UMD.HCIL.PiccoloX (in UMD.HCIL.PiccoloX.dll)

See Also

PControl Members | UMD.HCIL.PiccoloX.Nodes Namespace

Web Accessibility