Image
Examples#
See these.
Image
#
Bases: Shape
Draws an image.
height
#
height: Number | None = None
The height of the rectangle to draw the image into. Use image height if None.
page
#
The page (of type Page
or PageView
) to which this control belongs to.
parent
#
parent: BaseControl | None
The direct ancestor(parent) of this control.
It defaults to None
and will only have a value when this control is mounted (added to the page tree).
The Page
control (which is the root of the tree) is an exception - it always has parent=None
.
src
#
src: str | None = None
Draws an image from a source.
This could be an external URL or a local asset file.
width
#
width: Number | None = None
The width of the rectangle to draw the image into. Use image width if None.
before_update
#
This method is called every time when this control is being updated.
Note
Make sure not to call/request an update()
here.
build
#
Called once during control initialization to define its child controls. self.page is available in this method.