TCnPictureBox.Image Property

Gets or sets the image that is displayed by PictureBox.

Namespace: CNClrLib.Control.PictureBox
published
 property Image: TClrImage read GetImage write SetImage stored IsImageStored;

Property Value

Type: TClrImage

The Image to display.

The Image property is set to the Image to display. You can do this either at design time or at run time.

Note

If you want to use the same image in multiple TCnPictureBox controls, create a clone of the image for each TCnPictureBox . Accessing the same image from multiple controls causes an exception to occur.

Setting Image at design time brings up the Image Editor below, which can be used to specify the file that contains the image.

Use the Image Editor to select an image to add to any of the graphic-compatible components.

To open the Image editor:

  1. Place a graphic-compatible component (such as TCnPictureBox ) on the form.
  2. With that component selected, do one of the following:
  3. Click the ellipsis button in the Value column for properties (such as the Image, ErrorImage and InitialImage properties of TCnPictureBox ) related to editing the image.
  4. Double-click the Value column for properties related to editing the picture.
Note: To open the Image editor from an TCnPictureBox component, you can also double-click the component on the form.
Picture editor commandsThe Picture editor provides the following commands:
  • Load: Display the Load Picture dialog box, where you can select an existing file to read into the Image editor. For more information about loading images into the Picture editor, see the information on loading an image at design time.
  • Save: Display the Save Picture As dialog box, where you can specify a directory and file name in which to store the image.
  • Clear: Remove the association between the current image and the selected component.