ImagePreview.ImagePreview Class Reference


Detailed Description

This is an non-interactive control that can be used to preview an image from disk.

The image is displayed with a new-look border, and is bracketed as needed with grey bars so that the image will keep its aspect ratio.

List of all members.

Public Member Functions

  __init__ ()
  Initialize the class.
  SetDefaultImageNotFound ()
  GetDefaultImageNotFound ()
  SetImagePath ()
  Specify the path of the image to be displayed in this control.
  HasImagePath ()
  Return True if there is a non-null image pat.
  GetImagePath ()
  Reload ()
  Reload the image from file.
  GetAspectRatio ()
  Return the (width,height) of the image.

Member Function Documentation

ImagePreview.ImagePreview.__init__ ( )

Initialize the class.

parent: The window that is a parent of this control id: a unique id path: the path of an image file name, or an empty string if no image pos: a tuple (x,y) for the upper-left corner of the control size: a tuple (w,h) for the size of the control

ImagePreview.ImagePreview.SetDefaultImageNotFound ( )
ImagePreview.ImagePreview.GetDefaultImageNotFound ( )
ImagePreview.ImagePreview.SetImagePath ( )

Specify the path of the image to be displayed in this control.

An empty string will clear the control.

ImagePreview.ImagePreview.HasImagePath ( )

Return True if there is a non-null image pat.

ImagePreview.ImagePreview.GetImagePath ( )
ImagePreview.ImagePreview.Reload ( )

Reload the image from file.

ImagePreview.ImagePreview.GetAspectRatio ( )

Return the (width,height) of the image.

If There is no image, return (0,0)


ImagePreview.ImagePreview ImagePreview.ImagePreview ImagePreview.ImagePreview ImagePreview.ImagePreview ImagePreview.ImagePreview ImagePreview.ImagePreview ImagePreview.ImagePreview ImagePreview.ImagePreview ImagePreview.ImagePreview ImagePreview.ImagePreview
ImagePreview.ImagePreview ImagePreview.ImagePreview ImagePreview.ImagePreview ImagePreview.ImagePreview ImagePreview.ImagePreview ImagePreview.ImagePreview ImagePreview.ImagePreview ImagePreview.ImagePreview ImagePreview.ImagePreview ImagePreview.ImagePreview