ImageView Type
⚠ Process Availability: Main ✔ | Renderer ❌ | Utility ❌ | Exported ✔
A View that displays an image.Process: MainThis module cannot be used until the ready event of the app module is emitted.Useful for showing splash screens that will be swapped for WebContentsViews when the content finishes loading.Note that ImageView is experimental and may be changed or removed in the future.### Class: ImageView extends View> A View that displays an image.Process: MainImageView inherits from View.ImageView is an EventEmitter.> [!WARNING] Electron's built-in classes cannot be subclassed in user code. For more information, see the FAQ.
Constructors
| Constructor |
Description
|
|
|
Instance members
| Instance member |
Description
|
|
If the same View is added to a parent which already contains it, it will be reordered such that it becomes the topmost view.
|
|
A View[] property representing the child views of this view.
|
|
The bounds of this View, relative to its parent.
|
Full Usage:
this.getVisible ()
Returns: bool
Modifiers: inline |
Whether the view should be drawn. Note that this is different from whether the view is visible on screen—it may still be obscured or out of view.
|
Full Usage:
this.offBoundsChanged handler
Parameters:
unit -> unit
Modifiers: inline |
Emitted when the view's bounds have changed in response to being laid out. The new bounds can be retrieved with view.getBounds().
|
Full Usage:
this.onBoundsChanged handler
Parameters:
unit -> unit
Modifiers: inline |
Emitted when the view's bounds have changed in response to being laid out. The new bounds can be retrieved with view.getBounds().
|
Full Usage:
this.onceBoundsChanged handler
Parameters:
unit -> unit
Modifiers: inline |
Emitted when the view's bounds have changed in response to being laid out. The new bounds can be retrieved with view.getBounds().
|
|
If the view passed as a parameter is not a child of this view, this method is a no-op.
|
Full Usage:
this.setBackgroundColor color
Parameters:
string
Modifiers: inline |
Examples of valid color values:* Hex * #fff (RGB) * #ffff (ARGB) * #ffffff (RRGGBB) * ffffffff (AARRGGBB)* RGB * rgb(([\d]+),\s*([\d]+),\s*([\d]+)) * e.g. rgb(255, 255, 255)* RGBA * rgba(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+))
|
Full Usage:
this.setBorderRadius radius
Parameters:
int
Modifiers: inline |
|
|
|
|
Sets the image for this ImageView. Note that only image formats supported by NativeImage can be used with an ImageView.
|
Full Usage:
this.setVisible visible
Parameters:
bool
Modifiers: inline |
|
fable-electron-docs-api