enaml.widgets.image_view
Classes
A widget which can display an Image with optional scaling. |
- class enaml.widgets.image_view.ImageView(parent=None, **kwargs)[source]
Bases:
Control
A widget which can display an Image with optional scaling.
- image
The image to display in the viewer.
- scale_to_fit
Whether or not to scale the image with the size of the component.
- allow_upscaling
Whether to allow upscaling of an image if scale_to_fit is True.
- preserve_aspect_ratio
Whether or not to preserve the aspect ratio if scaling the image.
- hug_width
An image view hugs its width weakly by default.
- hug_height
An image view hugs its height weakly by default.
- proxy
A reference to the ProxyImageView object.
- activated
An event fired when an object’s proxy is activated. It is triggered once during the object lifetime, at the end of the activate_proxy method.
- background
The background color of the widget.
- destroyed
An event fired when an object has been destroyed. It is triggered once during the object lifetime, just before the object is removed from the tree structure.
- enabled
Whether or not the widget is enabled.
- initialized
An event fired when an object is initialized. It is triggered once during the object lifetime, at the end of the initialize method.
- name
Export the ‘name’ attribute as a declarative member.
- style_class
The style class to which this item belongs. Multiple classes can be separated with whitespace. An empty string indicates the widget does not belong to any style class.