Xbasic

{ImageViewer}

IN THIS PAGE

Syntax

{ImageViewer= Width, Height ImageVariable }

Arguments

Width

Numeric. An integer value for the maximum number of characters to display on one line. The actual number displayed may be less because of word wrap.

Height

Numeric. Optional. Default = 1. The number of rows to display. This may be a fractional number, such as 1.25.

ImageVariable

Pointer. A pointer variable with the following properties: Width, The width of the loaded image in pixels. This property must be initialized to zero before loading the image. Height, The height of the loaded image in pixels. This property must be initialized to zero before loading the image. LoadEvent, The name of the event that will fire when the .Object.LoadImage() method runs.

Description

Allows you to load image from files on disk and view them in a window on an Xdialog.

Discussion 

The {ImageViewer} control allows you to load image from files on disk and view them in a window on an Xdialog. The control will display .BMP, .GIF, .JPEG, and .PNG image types. There are three viewing modes for images:

  • Absolute (no scaling)

  • Best Fit (scaling without distortion)

  • Stretch (scaling to fill the control's window)

The control places the size is of the loaded image into ImageVariable.Width and ImageVariable.Height.

Example 

See ImageViewer Control - Displaying Images on an Xdialog.

Limitations

Desktop applications only

See Also