View Type
⚠ Process Availability: Main ✔ | Renderer ❌ | Utility ❌ | Exported ✔
Create and layout native views.Process: MainThis module cannot be used until the ready event of the app module is emitted.### Class: View> A basic native view.Process: MainView is an EventEmitter.> [!WARNING] Electron's built-in classes cannot be subclassed in user code. For more information, see the FAQ.
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 |
|
|
|
Full Usage:
this.setVisible visible
Parameters:
bool
Modifiers: inline |
|
fable-electron-docs-api