anvil Module

Classes

AppEnvironment AppInfo Attrs BlobMedia Button Canvas CheckBox Classes ColumnPanel Component Container DataGrid DataRowPanel DatePicker DropDown FileLoader FlowPanel GoogleMap GoogleMap.AbstractOverlay GoogleMap.Animation GoogleMap.Circle GoogleMap.ControlPosition GoogleMap.Data GoogleMap.Data.Feature GoogleMap.Data.Geometry GoogleMap.Data.GeometryCollection GoogleMap.Data.LinearRing GoogleMap.Data.LineString GoogleMap.Data.MultiLineString GoogleMap.Data.MultiPoint GoogleMap.Data.MultiPolygon GoogleMap.Data.Point GoogleMap.Data.Polygon GoogleMap.Data.StyleOptions GoogleMap.FullscreenControlOptions GoogleMap.GeocoderAddressComponent GoogleMap.GeocoderGeometry GoogleMap.GeocoderLocationType GoogleMap.GeocoderResult GoogleMap.Icon GoogleMap.IconSequence GoogleMap.InfoWindow GoogleMap.LatLng GoogleMap.LatLngBounds GoogleMap.LatLngBoundsLiteral GoogleMap.LatLngLiteral GoogleMap.MapTypeControlOptions GoogleMap.MapTypeControlStyle GoogleMap.MapTypeId GoogleMap.Marker GoogleMap.MarkerLabel GoogleMap.MotionTrackingControlOptions GoogleMap.Point GoogleMap.Polygon GoogleMap.Polyline GoogleMap.Rectangle GoogleMap.RotateControlOptions GoogleMap.ScaleControlOptions GoogleMap.Size GoogleMap.StreetViewControlOptions GoogleMap.StrokePosition GoogleMap.Symbol GoogleMap.SymbolPath GoogleMap.ZoomControlOptions GridPanel HtmlComponent HtmlTemplate Image Label LinearPanel Link Media Notification Plot RadioButton RepeatingPanel RichText Slot Spacer Style TextArea TextBox Timer URLMedia WithLayout XYPanel YouTubeVideo

Globals

app

Classes

AppEnvironment


AppEnvironment Attributes

name - string

The name of the current environment

tags - list

tags associated with the current environment


AppInfo


Instance Methods

get_asset([path])

Get an asset file from the app’s theme assets.

    get_client_config([package_name])

    Get the client config for the specified package. If no package name is specified, the client config for the current app is returned.

      get_server_config([package_name])

      Get the server config for the specified package. If no package name is specified, the server config for the current app is returned.


        AppInfo Attributes

        branch - string

        The Git branch from which the current app is being run. This is ‘master’ for development apps or apps without a published version, and ‘published’ if this app is being run from its published version.

        environment - anvil.AppEnvironment instance

        The environment in which the current app is being run.

        id - string

        A unique identifier for the current app

        package_name - string

        The package name of this app

        theme_colors - mapping

        Theme colors for this app as a readonly dict.


        Attrs

        Create a live HTML attribute helper. value may be None, a dictionary of attribute names to values, or another Attrs object.

        Constructor

        Attrs([value=None])

          Instance Methods

          clear()

          Remove all managed HTML attributes.

            items() → iterator

            Return an iterator over (name, value) pairs for this attrs object.

              keys() → iterator[string]

              Return an iterator over the attribute names in this attrs object.

                update(updates=None, **kwargs)

                Merge attribute names and values into this attrs object. None values remove attributes.

                  values() → iterator[string]

                  Return an iterator over the attribute values in this attrs object.


                    BlobMedia

                    Create a Media object with the specified content_type (a string such as ’text/plain’) and content (a binary string). Optionally specify a filename as well.


                    Base class: anvil.Media

                    Constructor

                    BlobMedia(content_type, content, [name=None])

                      Button (more info)

                      Create a new ‘Button’ object


                      Base class: anvil.Component

                      Constructor

                      Button([spacing_above=], [spacing_below=], [spacing=], [enabled=], [text=], [align=], [font_size=], [font=], [bold=], [italic=], [underline=], [background=], [foreground=], [border=], [visible=], [role=], [icon=], [icon_align=], [tag=], [tooltip=])

                        Button Methods

                        add_event_handler(event_name, handler_func)

                        Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                          remove_event_handler(event_name, [handler_func])

                          Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                            set_event_handler(event_name, handler_func)

                            Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                              Button Properties

                              align - enum: "left", "center", "right", "full"

                              The position of this button in the available space.

                              background - color

                              The background colour of this component.

                              bold - boolean

                              Display this component’s text in bold

                              border - string

                              The border of this component. Can take any valid CSS border value.

                              enabled - boolean

                              True if this component should allow user interaction.

                              font - string

                              The font to use for this component.

                              font_size - number

                              The height of text displayed on this component in pixels

                              foreground - color

                              The foreground colour of this component.

                              icon - icon

                              The icon to display on this component. Either a URL, or a FontAwesome Icon, e.g. ‘fa:user’.

                              icon_align - enum: "left_edge", "left", "top", "right", "right_edge"

                              The alignment of the icon on this component. Set to ’top’ for a centred icon on a component with no text.

                              italic - boolean

                              Display this component’s text in italics

                              parent

                              role - themeRole

                              Choose how this component can appear, based on your app’s visual theme.

                              spacing - spacing

                              Margin and padding for this container. Only available in apps that have been migrated to use Layouts.

                              spacing_above - enum: "none", "small", "medium", "large"

                              The vertical space above this component.

                              spacing_below - enum: "none", "small", "medium", "large"

                              The vertical space below this component.

                              tag - object

                              Use this property to store any extra information about this component

                              text - string

                              The text displayed on this component

                              tooltip - string

                              Text to display when you hover the mouse over this component

                              underline - boolean

                              Display this component’s text underlined

                              visible - boolean

                              Should this component be displayed?


                              Button Events

                              click(keys)

                              When the button is clicked

                              • keys - A dictionary of keys including 'shift', 'alt', 'ctrl', 'meta'. Each key's value is a boolean indicating if it was pressed during the click event. The meta key on a mac is the Command key

                              show()

                              When the Button is shown on the screen

                              hide()

                              When the Button is removed from the screen


                              Canvas (more info)

                              Create a new ‘Canvas’ object


                              Base class: anvil.Component

                              Constructor

                              Canvas([spacing_above=], [spacing_below=], [margin=], [height=], [background=], [foreground=], [border=], [visible=], [role=], [tag=], [tooltip=])

                                Canvas Methods

                                add_color_stop(offset, color)

                                Creates a new color stop on the gradient object. The offset argument is a number between 0 and 1, and defines the relative position of the color in the gradient. The color argument must be a string representing a CSS color.

                                  add_event_handler(event_name, handler_func)

                                  Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                    arc(x, y, radius, start_angle=0, end_angle=PI*2, anticlockwise=False)

                                    Adds an arc to the end of the current path with specified center and radius.

                                      begin_path()

                                      Begin a path on the canvas.

                                      bezier_curve_to(cp1x, cp1y, cp2x, cp2y, x, y)

                                      Adds a Bezier curve at the end of the current path to (x,y) with control points (cp1x,cp1y) and (cp2x,cp2y).

                                        clear_rect(x, y, width, height)

                                        Clear the specified rectangle with the background color of the canvas.

                                          clip()

                                          Turn the current path into the clipping region of the canvas.

                                          close_path()

                                          Close the current path with a straight line back to the start point.

                                          create_linear_gradient(x0, y0, x1, y1)

                                          Returns a gradient object representing a linear gradient from (x0,y0) to (x1,y1).

                                            create_radial_gradient(x0, y0, x1, y1)

                                            Returns a gradient object representing a radial gradient from (x0,y0) with radius r0 to (x1,y1) with radius r1.

                                              draw_image(media, [x], [y], [width], [height])

                                              Draw an image (from a Media object) onto the canvas at the specified coordinates (optionally scaling to the specified width and height)

                                                draw_image_part(media, sx, sy, s_width, s_height, dx, dy, d_width, d_height)

                                                Draw a subset of an image (from a Media object) onto the canvas.

                                                sx, sy, s_width and s_height specify which pixels within the source image of the source image to draw. dx and dy (and optionally d_width and d_height) specify where (and optionally what dimensions) on the canvas to draw the image.

                                                  fill()

                                                  Fill the current path with the current fill style of the canvas.

                                                  fill_rect(x, y, width, height)

                                                  Fill the specified rectangle with the current fill style of the canvas.

                                                    fill_text(text, x, y)

                                                    Draw the specified text at the required position.

                                                      get_height()

                                                      Get the pixel height of this canvas.

                                                      get_image()

                                                      Take a snapshot of the canvas and return an image as a Media object.

                                                      get_width()

                                                      Get the pixel width of this canvas.

                                                      line_to(x, y)

                                                      Adds a straight line segment at the end of the current path to the specified position.

                                                        measure_text(text)

                                                        Get the size of the specified text in the current font.

                                                          move_to(x, y)

                                                          Moves the current path position to the specified point without drawing.

                                                            quadratic_curve_to(cpx, cpy, x, y)

                                                            Adds a quadratic curve at the end of the current path to (x,y) with control point (cpx, cpy).

                                                              remove_event_handler(event_name, [handler_func])

                                                              Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                reset_context()

                                                                Reset the drawing context for this canvas. Called automatically after a window resize.

                                                                reset_transform()

                                                                Reset the current transform to the identity matrix.

                                                                restore()

                                                                Restores a drawing transform saved by the ‘save()’ function

                                                                rotate(angle)

                                                                Rotate all subsequent drawing by ‘angle’ radians.

                                                                  save()

                                                                  Saves the current drawing transform, which can be restored by calling ‘restore()’

                                                                  scale(x, y)

                                                                  Scale all subsequent drawing operations by ‘x’ horizontally and ‘y’ vertically.

                                                                    set_event_handler(event_name, handler_func)

                                                                    Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.

                                                                      set_transform()

                                                                      Set the current transform matrix to the specified values.

                                                                      stroke()

                                                                      Draw the current path with the current stroke style of the canvas.

                                                                      stroke_rect(x, y, width, height)

                                                                      Outline the specified rectangle with the current stroke style of the canvas.

                                                                        stroke_text(text, x, y)

                                                                        Draw the outline of the specified text at the required position.

                                                                          transform(a, b, c, d, e, f)

                                                                          Multiply the current transform matrix by the specified matrix.

                                                                            translate(x, y)

                                                                            Translate all subsequent drawing by ‘x’ pixels across and ‘y’ pixels down.


                                                                              Canvas Properties

                                                                              background - color

                                                                              The background colour of this component.

                                                                              border - string

                                                                              The border of this component. Can take any valid CSS border value.

                                                                              fill_style - string

                                                                              The color or gradient to use when filling shapes and paths.

                                                                              font - string

                                                                              The font to use when drawing text on this canvas.

                                                                              foreground - color

                                                                              The foreground colour of this component.

                                                                              global_alpha - number

                                                                              The global opacity to draw with, in the range 0-1.

                                                                              global_composite_operation - string

                                                                              The global composite operation to draw with. Defaults to ‘source-over’

                                                                              height - string

                                                                              The height of this component.

                                                                              line_cap - string

                                                                              The line cap to use when drawing lines on this canvas.

                                                                              line_join - string

                                                                              The line join to use when connecting lines on this canvas.

                                                                              line_width - number

                                                                              The width of lines drawn on this canvas.

                                                                              margin - margin

                                                                              Margin for this component. Only available in apps that have been migrated to use Layouts.

                                                                              miter_limit - number

                                                                              The limit of line join miters, in pixels.

                                                                              parent

                                                                              role - themeRole

                                                                              Choose how this component can appear, based on your app’s visual theme.

                                                                              shadow_blur - number

                                                                              The required shadow blur, in pixels.

                                                                              shadow_color - string

                                                                              The color to use for shadows.

                                                                              shadow_offset_x - number

                                                                              The horizontal shadow offset, in pixels.

                                                                              shadow_offset_y - number

                                                                              The vertical shadow offset, in pixels.

                                                                              spacing_above - enum: "none", "small", "medium", "large"

                                                                              The vertical space above this component.

                                                                              spacing_below - enum: "none", "small", "medium", "large"

                                                                              The vertical space below this component.

                                                                              stroke_style - string

                                                                              The color or gradient to use when drawing outlines.

                                                                              tag - object

                                                                              Use this property to store any extra information about this component

                                                                              text_align - string

                                                                              Text alignment, relative to the drawing point.

                                                                              text_baseline - string

                                                                              Text baseline, relative to the drawing point.

                                                                              tooltip - string

                                                                              Text to display when you hover the mouse over this component

                                                                              visible - boolean

                                                                              Should this component be displayed?


                                                                              Canvas Events

                                                                              reset()

                                                                              When the canvas is reset and cleared, such as when the window resizes, or the canvas is added to a form.

                                                                              show()

                                                                              When the Canvas is shown on the screen

                                                                              hide()

                                                                              When the Canvas is removed from the screen

                                                                              mouse_enter(x, y)

                                                                              When the mouse cursor enters this component

                                                                              • x - The x coordinate of the mouse pointer, within this component
                                                                              • y - The y coordinate of the mouse pointer, within this component

                                                                              mouse_leave(x, y)

                                                                              When the mouse cursor leaves this component

                                                                              • x - The x coordinate of the mouse pointer relative to this component
                                                                              • y - The y coordinate of the mouse pointer relative to this component

                                                                              mouse_move(x, y)

                                                                              When the mouse cursor moves over this component

                                                                              • x - The x coordinate of the mouse pointer within this component
                                                                              • y - The y coordinate of the mouse pointer within this component

                                                                              mouse_down(x, y, button, keys)

                                                                              When a mouse button is pressed on this component

                                                                              • x - The x coordinate of the mouse pointer within this component
                                                                              • y - The y coordinate of the mouse pointer within this component
                                                                              • button - The button that was pressed (1 = left, 2 = middle, 3 = right)
                                                                              • keys - A dictionary of keys including 'shift', 'alt', 'ctrl', 'meta'. Each key's value is a boolean indicating if it was pressed during the click event. The meta key on a mac is the Command key

                                                                              mouse_up(x, y, button, keys)

                                                                              When a mouse button is released on this component

                                                                              • x - The x coordinate of the mouse pointer within this component
                                                                              • y - The y coordinate of the mouse pointer within this component
                                                                              • button - The button that was released (1 = left, 2 = middle, 3 = right)
                                                                              • keys - A dictionary of keys including 'shift', 'alt', 'ctrl', 'meta'. Each key's value is a boolean indicating if it was pressed during the click event. The meta key on a mac is the Command key


                                                                              CheckBox (more info)

                                                                              Create a new ‘CheckBox’ object


                                                                              Base class: anvil.Component

                                                                              Constructor

                                                                              CheckBox([checked=], [allow_indeterminate=], [enabled=], [spacing_above=], [spacing_below=], [spacing=], [text=], [align=], [font_size=], [font=], [bold=], [italic=], [underline=], [background=], [foreground=], [border=], [visible=], [role=], [tooltip=], [tag=])

                                                                                CheckBox Methods

                                                                                add_event_handler(event_name, handler_func)

                                                                                Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                  focus()

                                                                                  Set the keyboard focus to this component

                                                                                  remove_event_handler(event_name, [handler_func])

                                                                                  Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                    set_event_handler(event_name, handler_func)

                                                                                    Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                      CheckBox Properties

                                                                                      align - enum: "left", "center", "right"

                                                                                      Align this component’s text

                                                                                      allow_indeterminate - boolean

                                                                                      Support an indeterminate state. The indeterminate state can only be set in code by setting checked=None.

                                                                                      background - color

                                                                                      The background colour of this component.

                                                                                      bold - boolean

                                                                                      Display this component’s text in bold

                                                                                      border - string

                                                                                      The border of this component. Can take any valid CSS border value.

                                                                                      checked - boolean

                                                                                      The status of the checkbox

                                                                                      enabled - boolean

                                                                                      True if this component should allow user interaction.

                                                                                      font - string

                                                                                      The font to use for this component.

                                                                                      font_size - number

                                                                                      The height of text displayed on this component in pixels

                                                                                      foreground - color

                                                                                      The foreground colour of this component.

                                                                                      italic - boolean

                                                                                      Display this component’s text in italics

                                                                                      parent

                                                                                      role - themeRole

                                                                                      Choose how this component can appear, based on your app’s visual theme.

                                                                                      spacing - spacing

                                                                                      Margin and padding for this container. Only available in apps that have been migrated to use Layouts.

                                                                                      spacing_above - enum: "none", "small", "medium", "large"

                                                                                      The vertical space above this component.

                                                                                      spacing_below - enum: "none", "small", "medium", "large"

                                                                                      The vertical space below this component.

                                                                                      tag - object

                                                                                      Use this property to store any extra information about this component

                                                                                      text - string

                                                                                      The text displayed on this component

                                                                                      tooltip - string

                                                                                      Text to display when you hover the mouse over this component

                                                                                      underline - boolean

                                                                                      Display this component’s text underlined

                                                                                      visible - boolean

                                                                                      Should this component be displayed?


                                                                                      CheckBox Events

                                                                                      change()

                                                                                      When this checkbox is checked or unchecked

                                                                                      show()

                                                                                      When the CheckBox is shown on the screen

                                                                                      hide()

                                                                                      When the CheckBox is removed from the screen


                                                                                      Classes

                                                                                      Create a live class-list helper. value may be None, a string, a list of strings, a dictionary of class names to booleans, or another Classes object.

                                                                                      Constructor

                                                                                      Classes([value=None])

                                                                                        Instance Methods

                                                                                        add(value)

                                                                                        Add one or more class names. Strings are split on whitespace; duplicate classes are ignored.

                                                                                          clear()

                                                                                          Remove all class names.

                                                                                            remove(value)

                                                                                            Remove one or more class names. Missing classes are ignored.

                                                                                              update(updates=None, **kwargs)

                                                                                              Merge class names into this class-list helper. Truthy values add classes; falsey values remove them.


                                                                                                ColumnPanel (more info)

                                                                                                Create a new ‘ColumnPanel’ object


                                                                                                Base class: anvil.Container

                                                                                                Constructor

                                                                                                ColumnPanel([col_widths=], [wrap_on=], [col_spacing=], [spacing_above=], [spacing_below=], [spacing=], [background=], [foreground=], [border=], [visible=], [role=], [tag=], [tooltip=])

                                                                                                  ColumnPanel Methods

                                                                                                  add_component(component, [index=None], full_width_row=False, **layout_props)

                                                                                                  Add a component to this ColumnPanel at the ‘index’th position. If ‘index’ is not specified, adds to the bottom. Useful layout properties:

                                                                                                  full_width_row = True|False row_background = [colour]

                                                                                                    add_event_handler(event_name, handler_func)

                                                                                                    Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                      remove_event_handler(event_name, [handler_func])

                                                                                                      Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                        set_event_handler(event_name, handler_func)

                                                                                                        Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                          ColumnPanel Properties

                                                                                                          background - color

                                                                                                          The background colour of this component.

                                                                                                          border - string

                                                                                                          The border of this component. Can take any valid CSS border value.

                                                                                                          col_spacing - enum: "none", "tiny", "small", "medium", "large", "huge"

                                                                                                          Space between columns

                                                                                                          col_widths - string

                                                                                                          Custom column widths in this panel

                                                                                                          foreground - color

                                                                                                          The foreground colour of this component.

                                                                                                          parent

                                                                                                          role - themeRole

                                                                                                          Choose how this component can appear, based on your app’s visual theme.

                                                                                                          spacing - spacing

                                                                                                          Margin and padding for this container. Only available in apps that have been migrated to use Layouts.

                                                                                                          spacing_above - enum: "none", "small", "medium", "large"

                                                                                                          The vertical space above this component.

                                                                                                          spacing_below - enum: "none", "small", "medium", "large"

                                                                                                          The vertical space below this component.

                                                                                                          tag - object

                                                                                                          Use this property to store any extra information about this component

                                                                                                          tooltip - string

                                                                                                          Text to display when you hover the mouse over this component

                                                                                                          visible - boolean

                                                                                                          Should this component be displayed?

                                                                                                          wrap_on - enum: "never", "mobile", "tablet"

                                                                                                          The largest display on which to wrap columns in this panel


                                                                                                          ColumnPanel Events

                                                                                                          show()

                                                                                                          When the ColumnPanel is shown on the screen

                                                                                                          hide()

                                                                                                          When the ColumnPanel is removed from the screen


                                                                                                          Component

                                                                                                          Create a new ‘Component’ object

                                                                                                          Constructor

                                                                                                          Component()

                                                                                                          Instance Methods

                                                                                                          add_event_handler(event_name, handler_func)

                                                                                                          Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                            get_event_handlers(event_name) → tuple_of_event_handlers

                                                                                                            Get the current event_handlers for a given event_name

                                                                                                              raise_event(event_name, **event_args)

                                                                                                              Trigger the event on this component. Any keyword arguments are passed to the handler function.

                                                                                                                remove_event_handler(event_name, [handler_func])

                                                                                                                Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                  remove_from_parent()

                                                                                                                  Remove this component from its parent container.

                                                                                                                  scroll_into_view(smooth=False, align="center")

                                                                                                                  Scroll the window to make sure this component is in view.

                                                                                                                  • smooth - Determines whether the scroll should be smooth or instant.

                                                                                                                  • align - Determines where the component should be aligned within the viewport. Options are 'start', 'center', 'end', and 'nearest'.

                                                                                                                  set_event_handler(event_name, handler_func)

                                                                                                                  Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                    Container

                                                                                                                    Create a new ‘Container’ object


                                                                                                                    Base class: anvil.Component

                                                                                                                    Constructor

                                                                                                                    Container()

                                                                                                                    Instance Methods

                                                                                                                    add_component(component)

                                                                                                                    Add a component to this container.

                                                                                                                      clear()

                                                                                                                      Remove all components from this container

                                                                                                                      get_components()

                                                                                                                      Get a list of components in this container

                                                                                                                      raise_event_on_children(event_name, **event_args)

                                                                                                                      Trigger the ’event_name’ event on all children of this component. Any keyword arguments are passed to the handler function.


                                                                                                                        DataGrid (more info)

                                                                                                                        Create a new ‘DataGrid’ object


                                                                                                                        Base class: anvil.Container

                                                                                                                        Constructor

                                                                                                                        DataGrid([columns=], [auto_header=], [show_page_controls=], [rows_per_page=], [wrap_on=], [spacing_above=], [spacing_below=], [margin=], [background=], [foreground=], [border=], [visible=], [role=], [tag=], [tooltip=])

                                                                                                                          DataGrid Methods

                                                                                                                          add_component(component, [index=None], [pinned=False])

                                                                                                                          Add a component to this DataGrid, in the ‘index’th position. If ‘index’ is not specified, adds to the bottom.

                                                                                                                            add_event_handler(event_name, handler_func)

                                                                                                                            Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                              get_page()

                                                                                                                              Get the current page number of this DataGrid

                                                                                                                              jump_to_first_page()

                                                                                                                              Jump to the first page of this DataGrid

                                                                                                                              jump_to_last_page()

                                                                                                                              Jump to the last page of this DataGrid

                                                                                                                              next_page()

                                                                                                                              Jump to the next page of this DataGrid

                                                                                                                              previous_page()

                                                                                                                              Jump to the previous page of this DataGrid

                                                                                                                              remove_event_handler(event_name, [handler_func])

                                                                                                                              Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                set_event_handler(event_name, handler_func)

                                                                                                                                Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.

                                                                                                                                  set_page(page)

                                                                                                                                  Set the page number of this DataGrid. The page number must be positive


                                                                                                                                    DataGrid Properties

                                                                                                                                    auto_header - boolean

                                                                                                                                    Whether to display an automatic header at the top of this Data Grid.

                                                                                                                                    background - color

                                                                                                                                    The background colour of this component.

                                                                                                                                    border - string

                                                                                                                                    The border of this component. Can take any valid CSS border value.

                                                                                                                                    columns - dataGridColumns

                                                                                                                                    A list of columns to display in this Data Grid.

                                                                                                                                    foreground - color

                                                                                                                                    The foreground colour of this component.

                                                                                                                                    margin - margin

                                                                                                                                    Margin for this component. Only available in apps that have been migrated to use Layouts.

                                                                                                                                    parent

                                                                                                                                    role - themeRole

                                                                                                                                    Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                    rows_per_page - number

                                                                                                                                    The maximum number of rows to display at one time.

                                                                                                                                    show_page_controls - boolean

                                                                                                                                    Whether to display the next/previous page buttons.

                                                                                                                                    spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                    The vertical space above this component.

                                                                                                                                    spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                    The vertical space below this component.

                                                                                                                                    tag - object

                                                                                                                                    Use this property to store any extra information about this component

                                                                                                                                    tooltip - string

                                                                                                                                    Text to display when you hover the mouse over this component

                                                                                                                                    visible - boolean

                                                                                                                                    Should this component be displayed?

                                                                                                                                    wrap_on - enum: "never", "mobile", "tablet"

                                                                                                                                    The largest display on which to wrap columns in this DataGrid


                                                                                                                                    DataGrid Events

                                                                                                                                    page_changed(previous_page, current_page, source)

                                                                                                                                    When the current page changes, including navigation in code and automatic resets. Fires once after navigation completes, and not when the page stays the same. Handlers may navigate again; the event describes the completed change even if the page changes while a handler is waiting.

                                                                                                                                    • previous_page - The previous zero-based page number, or None if there was no previous page.
                                                                                                                                    • current_page - The zero-based page number after navigation completes.
                                                                                                                                    • source - How navigation was triggered: 'click' for pagination buttons, or 'code' for programmatic changes and automatic resets.

                                                                                                                                    show()

                                                                                                                                    When the DataGrid is shown on the screen

                                                                                                                                    hide()

                                                                                                                                    When the DataGrid is removed from the screen


                                                                                                                                    DataRowPanel (more info)

                                                                                                                                    Create a new ‘DataRowPanel’ object


                                                                                                                                    Base class: anvil.Container

                                                                                                                                    Constructor

                                                                                                                                    DataRowPanel([item=], [auto_display_data=], [align=], [font_size=], [font=], [bold=], [italic=], [underline=], [spacing_above=], [spacing_below=], [margin=], [background=], [foreground=], [border=], [visible=], [role=], [tooltip=], [tag=])

                                                                                                                                      DataRowPanel Methods

                                                                                                                                      add_component(component, [column=None])

                                                                                                                                      Add a component to the specified column of this DataRowPanel. TODO: If ‘column’ is not specified, adds the component full-width.

                                                                                                                                        add_event_handler(event_name, handler_func)

                                                                                                                                        Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                          remove_event_handler(event_name, [handler_func])

                                                                                                                                          Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                            set_event_handler(event_name, handler_func)

                                                                                                                                            Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                              DataRowPanel Properties

                                                                                                                                              align - enum: "left", "center", "right"

                                                                                                                                              Align this component’s text

                                                                                                                                              auto_display_data - boolean

                                                                                                                                              Whether to automatically display data in this row.

                                                                                                                                              background - color

                                                                                                                                              The background colour of this component.

                                                                                                                                              bold - boolean

                                                                                                                                              Display this component’s text in bold

                                                                                                                                              border - string

                                                                                                                                              The border of this component. Can take any valid CSS border value.

                                                                                                                                              font - string

                                                                                                                                              The font to use for this component.

                                                                                                                                              font_size - number

                                                                                                                                              The height of text displayed on this component in pixels

                                                                                                                                              foreground - color

                                                                                                                                              The foreground colour of this component.

                                                                                                                                              italic - boolean

                                                                                                                                              Display this component’s text in italics

                                                                                                                                              item - object

                                                                                                                                              The data to display in this row by default.

                                                                                                                                              margin - margin

                                                                                                                                              Margin for this component. Only available in apps that have been migrated to use Layouts.

                                                                                                                                              parent

                                                                                                                                              role - themeRole

                                                                                                                                              Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                              spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                              The vertical space above this component.

                                                                                                                                              spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                              The vertical space below this component.

                                                                                                                                              tag - object

                                                                                                                                              Use this property to store any extra information about this component

                                                                                                                                              tooltip - string

                                                                                                                                              Text to display when you hover the mouse over this component

                                                                                                                                              underline - boolean

                                                                                                                                              Display this component’s text underlined

                                                                                                                                              visible - boolean

                                                                                                                                              Should this component be displayed?


                                                                                                                                              DataRowPanel Events

                                                                                                                                              show()

                                                                                                                                              When the DataRowPanel is shown on the screen

                                                                                                                                              hide()

                                                                                                                                              When the DataRowPanel is removed from the screen


                                                                                                                                              DatePicker (more info)

                                                                                                                                              Create a new ‘DatePicker’ object


                                                                                                                                              Base class: anvil.Component

                                                                                                                                              Constructor

                                                                                                                                              DatePicker([date=], [format=], [pick_time=], [min_date=], [max_date=], [placeholder=], [align=], [font_size=], [font=], [bold=], [italic=], [underline=], [spacing_above=], [spacing_below=], [margin=], [enabled=], [background=], [foreground=], [border=], [visible=], [role=], [tooltip=], [tag=])

                                                                                                                                                DatePicker Methods

                                                                                                                                                add_event_handler(event_name, handler_func)

                                                                                                                                                Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                  focus()

                                                                                                                                                  Set the keyboard focus to this DatePicker

                                                                                                                                                  remove_event_handler(event_name, [handler_func])

                                                                                                                                                  Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                    set_event_handler(event_name, handler_func)

                                                                                                                                                    Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                      DatePicker Properties

                                                                                                                                                      align - enum: "left", "center", "right"

                                                                                                                                                      Align this component’s text

                                                                                                                                                      background - color

                                                                                                                                                      The background colour of this component.

                                                                                                                                                      bold - boolean

                                                                                                                                                      Display this component’s text in bold

                                                                                                                                                      border - string

                                                                                                                                                      The border of this component. Can take any valid CSS border value.

                                                                                                                                                      date - string

                                                                                                                                                      The date selected on this component.

                                                                                                                                                      enabled - boolean

                                                                                                                                                      True if this component should allow user interaction.

                                                                                                                                                      font - string

                                                                                                                                                      The font to use for this component.

                                                                                                                                                      font_size - number

                                                                                                                                                      The height of text displayed on this component in pixels

                                                                                                                                                      foreground - color

                                                                                                                                                      The foreground colour of this component.

                                                                                                                                                      format - string

                                                                                                                                                      The format in which to display the selected date.

                                                                                                                                                      italic - boolean

                                                                                                                                                      Display this component’s text in italics

                                                                                                                                                      margin - margin

                                                                                                                                                      Margin for this component. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                      max_date - string

                                                                                                                                                      The maximum date the user can select.

                                                                                                                                                      min_date - string

                                                                                                                                                      The minimum date the user can select.

                                                                                                                                                      parent

                                                                                                                                                      pick_time - boolean

                                                                                                                                                      Whether the user should be able to select a time as well as a date

                                                                                                                                                      placeholder - string

                                                                                                                                                      A string to display when the DatePicker is empty.

                                                                                                                                                      role - themeRole

                                                                                                                                                      Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                                      spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                      The vertical space above this component.

                                                                                                                                                      spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                      The vertical space below this component.

                                                                                                                                                      tag - object

                                                                                                                                                      Use this property to store any extra information about this component

                                                                                                                                                      tooltip - string

                                                                                                                                                      Text to display when you hover the mouse over this component

                                                                                                                                                      underline - boolean

                                                                                                                                                      Display this component’s text underlined

                                                                                                                                                      visible - boolean

                                                                                                                                                      Should this component be displayed?


                                                                                                                                                      DatePicker Events

                                                                                                                                                      change()

                                                                                                                                                      When the selected date changes

                                                                                                                                                      show()

                                                                                                                                                      When the DatePicker is shown on the screen

                                                                                                                                                      hide()

                                                                                                                                                      When the DatePicker is removed from the screen


                                                                                                                                                      Create a new ‘DropDown’ object


                                                                                                                                                      Base class: anvil.Component
                                                                                                                                                      DropDown([items=], [selected_value=], [include_placeholder=], [placeholder=], [spacing_above=], [spacing_below=], [margin=], [enabled=], [align=], [font_size=], [font=], [bold=], [italic=], [underline=], [background=], [foreground=], [border=], [visible=], [role=], [tag=], [tooltip=])

                                                                                                                                                        add_event_handler(event_name, handler_func)

                                                                                                                                                        Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                          focus()

                                                                                                                                                          Set the keyboard focus to this component

                                                                                                                                                          remove_event_handler(event_name, [handler_func])

                                                                                                                                                          Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                            set_event_handler(event_name, handler_func)

                                                                                                                                                            Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                              align - enum: "left", "center", "right", "full"

                                                                                                                                                              The position of this dropdown in the available space.

                                                                                                                                                              background - color

                                                                                                                                                              The background colour of this component.

                                                                                                                                                              bold - boolean

                                                                                                                                                              Display this component’s text in bold

                                                                                                                                                              border - string

                                                                                                                                                              The border of this component. Can take any valid CSS border value.

                                                                                                                                                              enabled - boolean

                                                                                                                                                              True if this component should allow user interaction.

                                                                                                                                                              font - string

                                                                                                                                                              The font to use for this component.

                                                                                                                                                              font_size - number

                                                                                                                                                              The height of text displayed on this component in pixels

                                                                                                                                                              foreground - color

                                                                                                                                                              The foreground colour of this component.

                                                                                                                                                              include_placeholder - boolean

                                                                                                                                                              Whether to add a placeholder item to the list with value None

                                                                                                                                                              italic - boolean

                                                                                                                                                              Display this component’s text in italics

                                                                                                                                                              items - text[]

                                                                                                                                                              The items to display in this dropdown.

                                                                                                                                                              margin - margin

                                                                                                                                                              Margin for this component. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                              parent

                                                                                                                                                              placeholder - string

                                                                                                                                                              The text to be displayed when the selected_value is None.

                                                                                                                                                              role - themeRole

                                                                                                                                                              Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                                              selected_value - object

                                                                                                                                                              The value of the currently selected item. Can only be set at runtime.

                                                                                                                                                              spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                              The vertical space above this component.

                                                                                                                                                              spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                              The vertical space below this component.

                                                                                                                                                              tag - object

                                                                                                                                                              Use this property to store any extra information about this component

                                                                                                                                                              tooltip - string

                                                                                                                                                              Text to display when you hover the mouse over this component

                                                                                                                                                              underline - boolean

                                                                                                                                                              Display this component’s text underlined

                                                                                                                                                              visible - boolean

                                                                                                                                                              Should this component be displayed?


                                                                                                                                                              change()

                                                                                                                                                              When an item is selected

                                                                                                                                                              show()

                                                                                                                                                              When the DropDown is shown on the screen

                                                                                                                                                              hide()

                                                                                                                                                              When the DropDown is removed from the screen


                                                                                                                                                              FileLoader (more info)

                                                                                                                                                              Create a new ‘FileLoader’ object


                                                                                                                                                              Base class: anvil.Component

                                                                                                                                                              Constructor

                                                                                                                                                              FileLoader([multiple=], [show_state=], [file=], [files=], [file_types=], [spacing_above=], [spacing_below=], [spacing=], [text=], [align=], [font_size=], [font=], [bold=], [italic=], [underline=], [background=], [foreground=], [border=], [visible=], [role=], [icon=], [icon_align=], [enabled=], [tag=], [tooltip=])

                                                                                                                                                                FileLoader Methods

                                                                                                                                                                add_event_handler(event_name, handler_func)

                                                                                                                                                                Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                  clear()

                                                                                                                                                                  Clear any selected files from this FileLoader

                                                                                                                                                                  focus()

                                                                                                                                                                  Set the keyboard focus to this FileLoader

                                                                                                                                                                  open_file_selector()

                                                                                                                                                                  Open the file selector from code, this should be called within a click event handler for another component

                                                                                                                                                                  remove_event_handler(event_name, [handler_func])

                                                                                                                                                                  Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                    set_event_handler(event_name, handler_func)

                                                                                                                                                                    Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                      FileLoader Properties

                                                                                                                                                                      align - enum: "left", "center", "right"

                                                                                                                                                                      Align this component’s text

                                                                                                                                                                      background - color

                                                                                                                                                                      The background colour of this component.

                                                                                                                                                                      bold - boolean

                                                                                                                                                                      Display this component’s text in bold

                                                                                                                                                                      border - string

                                                                                                                                                                      The border of this component. Can take any valid CSS border value.

                                                                                                                                                                      enabled - boolean

                                                                                                                                                                      True if this component should allow user interaction.

                                                                                                                                                                      file - anvil.Media instance

                                                                                                                                                                      The currently selected file (or the first, if multiple files are selected). This is a Media object.

                                                                                                                                                                      file_types - string

                                                                                                                                                                      Specify what type of file to upload. Can accept a MIME type (eg “image/png” or “image/*”), or an extension (eg “.png”), or a comma-separated set of them (eg “.png,.jpg,.jpeg”)

                                                                                                                                                                      files - list(anvil.Media instance)

                                                                                                                                                                      A list of currently selected files. Each file is a Media object.

                                                                                                                                                                      font - string

                                                                                                                                                                      The font to use for this component.

                                                                                                                                                                      font_size - number

                                                                                                                                                                      The height of text displayed on this component in pixels

                                                                                                                                                                      foreground - color

                                                                                                                                                                      The foreground colour of this component.

                                                                                                                                                                      icon - icon

                                                                                                                                                                      The icon to display on this component. Either a URL, or a FontAwesome Icon, e.g. ‘fa:user’.

                                                                                                                                                                      icon_align - enum: "left_edge", "left", "top", "right", "right_edge"

                                                                                                                                                                      The alignment of the icon on this component. Set to ’top’ for a centred icon on a component with no text.

                                                                                                                                                                      italic - boolean

                                                                                                                                                                      Display this component’s text in italics

                                                                                                                                                                      multiple - boolean

                                                                                                                                                                      If True, this FileLoader can load multiple files at the same time

                                                                                                                                                                      parent

                                                                                                                                                                      role - themeRole

                                                                                                                                                                      Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                                                      show_state - boolean

                                                                                                                                                                      If True, display a message describing selected files.

                                                                                                                                                                      spacing - spacing

                                                                                                                                                                      Margin and padding for this container. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                                      spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                                      The vertical space above this component.

                                                                                                                                                                      spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                                      The vertical space below this component.

                                                                                                                                                                      tag - object

                                                                                                                                                                      Use this property to store any extra information about this component

                                                                                                                                                                      text - string

                                                                                                                                                                      The text displayed on this component

                                                                                                                                                                      tooltip - string

                                                                                                                                                                      Text to display when you hover the mouse over this component

                                                                                                                                                                      underline - boolean

                                                                                                                                                                      Display this component’s text underlined

                                                                                                                                                                      visible - boolean

                                                                                                                                                                      Should this component be displayed?


                                                                                                                                                                      FileLoader Events

                                                                                                                                                                      change(file, files)

                                                                                                                                                                      When a new file is loaded into this FileLoader

                                                                                                                                                                      • file - The first selected file. Set the 'multiple' property to allow loading more than one file.
                                                                                                                                                                      • files - A list of loaded files. Set the 'multiple' property to allow loading more than one file.

                                                                                                                                                                      show()

                                                                                                                                                                      When the FileLoader is shown on the screen

                                                                                                                                                                      hide()

                                                                                                                                                                      When the FileLoader is removed from the screen

                                                                                                                                                                      focus()

                                                                                                                                                                      When the FileLoader gets focus

                                                                                                                                                                      lost_focus()

                                                                                                                                                                      When the FileLoader loses focus


                                                                                                                                                                      FlowPanel (more info)

                                                                                                                                                                      Create a new ‘FlowPanel’ object


                                                                                                                                                                      Base class: anvil.Container

                                                                                                                                                                      Constructor

                                                                                                                                                                      FlowPanel([align=], [vertical_align=], [gap=], [background=], [foreground=], [border=], [visible=], [role=], [tag=], [spacing_above=], [spacing_below=], [spacing=], [tooltip=])

                                                                                                                                                                        FlowPanel Methods

                                                                                                                                                                        add_component(component, [index=], [width=], [expand=])

                                                                                                                                                                        Add a component to this panel. Optionally specify the position in the panel to add it, or the width to apply to components that can’t self-size width-wise.

                                                                                                                                                                          add_event_handler(event_name, handler_func)

                                                                                                                                                                          Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                            remove_event_handler(event_name, [handler_func])

                                                                                                                                                                            Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                              set_event_handler(event_name, handler_func)

                                                                                                                                                                              Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                FlowPanel Properties

                                                                                                                                                                                align - enum: "left", "center", "right", "justify"

                                                                                                                                                                                Align this component’s content

                                                                                                                                                                                background - color

                                                                                                                                                                                The background colour of this component.

                                                                                                                                                                                border - string

                                                                                                                                                                                The border of this component. Can take any valid CSS border value.

                                                                                                                                                                                foreground - color

                                                                                                                                                                                The foreground colour of this component.

                                                                                                                                                                                gap - enum: "none", "tiny", "small", "medium", "large", "huge"

                                                                                                                                                                                Gap between components

                                                                                                                                                                                parent

                                                                                                                                                                                role - themeRole

                                                                                                                                                                                Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                                                                spacing - spacing

                                                                                                                                                                                Margin and padding for this container. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                                                spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                                                The vertical space above this component.

                                                                                                                                                                                spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                                                The vertical space below this component.

                                                                                                                                                                                tag - object

                                                                                                                                                                                Use this property to store any extra information about this component

                                                                                                                                                                                tooltip - string

                                                                                                                                                                                Text to display when you hover the mouse over this component

                                                                                                                                                                                vertical_align - enum: "top", "middle", "bottom", "full"

                                                                                                                                                                                Align this component’s content

                                                                                                                                                                                visible - boolean

                                                                                                                                                                                Should this component be displayed?


                                                                                                                                                                                FlowPanel Events

                                                                                                                                                                                show()

                                                                                                                                                                                When the FlowPanel is shown on the screen

                                                                                                                                                                                hide()

                                                                                                                                                                                When the FlowPanel is removed from the screen


                                                                                                                                                                                GoogleMap (more info)

                                                                                                                                                                                Create a new ‘GoogleMap’ object


                                                                                                                                                                                Base class: anvil.Container

                                                                                                                                                                                Constructor

                                                                                                                                                                                GoogleMap([map_data=], [background_color=], [center=], [clickable_icons=], [disable_default_ui=], [disable_double_click_zoom=], [draggable=], [draggable_cursor=], [dragging_cursor=], [fullscreen_control=], [fullscreen_control_options=], [gesture_handling=], [heading=], [keyboard_shortcuts=], [map_type_control=], [map_type_control_options=], [map_type_id=], [max_zoom=], [min_zoom=], [rotate_control=], [rotate_control_options=], [scale_control=], [scale_control_options=], [scroll_wheel=], [street_view_control=], [street_view_control_options=], [zoom=], [zoom_control=], [zoom_control_options=], [spacing_above=], [spacing_below=], [margin=], [height=], [visible=], [tag=])

                                                                                                                                                                                  GoogleMap Methods

                                                                                                                                                                                  add_event_handler(event_name, handler_func)

                                                                                                                                                                                  Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                    compute_area()

                                                                                                                                                                                    Returns the area of a closed path in square meters.

                                                                                                                                                                                    compute_length()

                                                                                                                                                                                    Returns the length of a path in meters.

                                                                                                                                                                                    remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                    Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                      set_event_handler(event_name, handler_func)

                                                                                                                                                                                      Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                        GoogleMap Properties

                                                                                                                                                                                        background_color - string

                                                                                                                                                                                        Color used for the background of the Map div. This color will be visible when tiles have not yet loaded as the user pans.

                                                                                                                                                                                        center - anvil.GoogleMap.LatLng instance

                                                                                                                                                                                        The Map center.

                                                                                                                                                                                        clickable_icons - boolean

                                                                                                                                                                                        When false, map icons are not clickable. A map icon represents a point of interest

                                                                                                                                                                                        disable_default_ui - boolean

                                                                                                                                                                                        Enables/disables all default UI.

                                                                                                                                                                                        disable_double_click_zoom - boolean

                                                                                                                                                                                        Enables/disables zoom and center on double click.

                                                                                                                                                                                        draggable - boolean

                                                                                                                                                                                        If false, prevents the map from being dragged.

                                                                                                                                                                                        draggable_cursor - string

                                                                                                                                                                                        The name or url of the cursor to display when mousing over a draggable map.

                                                                                                                                                                                        dragging_cursor - string

                                                                                                                                                                                        The name or url of the cursor to display when the map is being dragged.

                                                                                                                                                                                        fullscreen_control - boolean

                                                                                                                                                                                        The enabled/disabled state of the Fullscreen control.

                                                                                                                                                                                        fullscreen_control_options - anvil.GoogleMap.FullscreenControlOptions instance

                                                                                                                                                                                        The display options for the Fullscreen control.

                                                                                                                                                                                        gesture_handling - string

                                                                                                                                                                                        This setting controls how gestures on the map are handled.

                                                                                                                                                                                        heading - number

                                                                                                                                                                                        The heading for aerial imagery in degrees measured clockwise from cardinal direction North.

                                                                                                                                                                                        height - string

                                                                                                                                                                                        The height of this component.

                                                                                                                                                                                        keyboard_shortcuts - boolean

                                                                                                                                                                                        If false, prevents the map from being controlled by the keyboard.

                                                                                                                                                                                        map_data - anvil.GoogleMap.Data instance

                                                                                                                                                                                        Map data

                                                                                                                                                                                        map_type_control - boolean

                                                                                                                                                                                        The enabled/disabled state of the Map type control.

                                                                                                                                                                                        map_type_control_options - anvil.GoogleMap.MapTypeControlOptions instance

                                                                                                                                                                                        The display options for the Map type control.

                                                                                                                                                                                        map_type_id - anvil.GoogleMap.MapTypeId

                                                                                                                                                                                        The map type ID. Defaults to MapTypeId.ROADMAP

                                                                                                                                                                                        margin - margin

                                                                                                                                                                                        Margin for this component. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                                                        max_zoom - number

                                                                                                                                                                                        The maximum zoom level which will be displayed on the map.

                                                                                                                                                                                        min_zoom - number

                                                                                                                                                                                        The minimum zoom level which will be displayed on the map.

                                                                                                                                                                                        parent

                                                                                                                                                                                        rotate_control - boolean

                                                                                                                                                                                        The enabled/disabled state of the rotate control.

                                                                                                                                                                                        rotate_control_options - anvil.GoogleMap.RotateControlOptions instance

                                                                                                                                                                                        The display options for the rotate control.

                                                                                                                                                                                        scale_control - boolean

                                                                                                                                                                                        The enabled/disabled state of the scale control.

                                                                                                                                                                                        scale_control_options - anvil.GoogleMap.ScaleControlOptions instance

                                                                                                                                                                                        The display options for the scale control.

                                                                                                                                                                                        scroll_wheel - boolean

                                                                                                                                                                                        If false, disables scrollwheel zooming on the map.

                                                                                                                                                                                        spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                                                        The vertical space above this component.

                                                                                                                                                                                        spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                                                        The vertical space below this component.

                                                                                                                                                                                        street_view_control - boolean

                                                                                                                                                                                        The enabled/disabled state of the street view control.

                                                                                                                                                                                        street_view_control_options - anvil.GoogleMap.StreetViewControlOptions instance

                                                                                                                                                                                        The display options for the street view control.

                                                                                                                                                                                        tag - object

                                                                                                                                                                                        Use this property to store any extra information about this component

                                                                                                                                                                                        visible - boolean

                                                                                                                                                                                        Should this component be displayed?

                                                                                                                                                                                        zoom - number

                                                                                                                                                                                        The map zoom level.

                                                                                                                                                                                        zoom_control - boolean

                                                                                                                                                                                        The enabled/disabled state of the zoom control.

                                                                                                                                                                                        zoom_control_options - anvil.GoogleMap.ZoomControlOptions instance

                                                                                                                                                                                        The display options for the zoom control.


                                                                                                                                                                                        GoogleMap Events

                                                                                                                                                                                        bounds_changed()

                                                                                                                                                                                        when the viewport bounds have changed.

                                                                                                                                                                                        center_changed()

                                                                                                                                                                                        when the map center property changes.

                                                                                                                                                                                        click(lat_lng, pixel)

                                                                                                                                                                                        when the user clicks on the map.

                                                                                                                                                                                        • lat_lng - The position that was clicked.
                                                                                                                                                                                        • pixel - The position that was clicked.

                                                                                                                                                                                        dbl_click(lat_lng, pixel)

                                                                                                                                                                                        when the user double-clicks on the map.

                                                                                                                                                                                        • lat_lng - The position that was double-clicked.
                                                                                                                                                                                        • pixel - The position that was double-clicked.

                                                                                                                                                                                        drag()

                                                                                                                                                                                        This event is repeatedly fired while the user drags the map.

                                                                                                                                                                                        dragend()

                                                                                                                                                                                        when the user stops dragging the map.

                                                                                                                                                                                        dragstart()

                                                                                                                                                                                        when the user starts dragging the map.

                                                                                                                                                                                        heading_changed()

                                                                                                                                                                                        when the map heading property changes.

                                                                                                                                                                                        idle()

                                                                                                                                                                                        when the map becomes idle after panning or zooming.

                                                                                                                                                                                        maptypeid_changed()

                                                                                                                                                                                        when the mapTypeId property changes.

                                                                                                                                                                                        mousemove(lat_lng, pixel)

                                                                                                                                                                                        whenever the user's mouse moves over the map container.

                                                                                                                                                                                        • lat_lng - The position of the cursor.
                                                                                                                                                                                        • pixel - The position of the cursor.

                                                                                                                                                                                        mouseout(lat_lng, pixel)

                                                                                                                                                                                        when the user's mouse exits the map container.

                                                                                                                                                                                        • lat_lng - The position of the cursor.
                                                                                                                                                                                        • pixel - The position of the cursor.

                                                                                                                                                                                        mouseover(lat_lng, pixel)

                                                                                                                                                                                        when the user's mouse enters the map container.

                                                                                                                                                                                        • lat_lng - The position of the cursor.
                                                                                                                                                                                        • pixel - The position of the cursor.

                                                                                                                                                                                        projection_changed()

                                                                                                                                                                                        when the projection has changed.

                                                                                                                                                                                        rightclick(lat_lng, pixel)

                                                                                                                                                                                        when the user right-clicks on the map container.

                                                                                                                                                                                        • lat_lng - The position that was right-clicked.
                                                                                                                                                                                        • pixel - The position that was right-clicked.

                                                                                                                                                                                        tilesloaded()

                                                                                                                                                                                        when the visible tiles have finished loading.

                                                                                                                                                                                        tilt_changed()

                                                                                                                                                                                        when the map tilt property changes.

                                                                                                                                                                                        zoom_changed()

                                                                                                                                                                                        when the map zoom property changes.

                                                                                                                                                                                        data_addfeature(feature)

                                                                                                                                                                                        when the viewport bounds have changed.

                                                                                                                                                                                        • feature - The feature that was added.

                                                                                                                                                                                        data_click(feature, lat_lng)

                                                                                                                                                                                        for a click on the geometry.

                                                                                                                                                                                        • feature - The feature that was clicked.
                                                                                                                                                                                        • lat_lng - The position that was clicked.

                                                                                                                                                                                        data_dbl_click(feature, lat_lng)

                                                                                                                                                                                        for a double click on the geometry.

                                                                                                                                                                                        • feature - The feature that was double-clicked.
                                                                                                                                                                                        • lat_lng - The position that was double-clicked.

                                                                                                                                                                                        data_mousedown(feature, lat_lng)

                                                                                                                                                                                        for a mousedown on the geometry.

                                                                                                                                                                                        • feature - The feature the mouse is over.
                                                                                                                                                                                        • lat_lng - The position of the cursor.

                                                                                                                                                                                        data_mouseout(feature, lat_lng)

                                                                                                                                                                                        when the mouse leaves the area of the geometry.

                                                                                                                                                                                        • feature - The feature the mouse left.
                                                                                                                                                                                        • lat_lng - The position of the cursor.

                                                                                                                                                                                        data_mouseover(feature, lat_lng)

                                                                                                                                                                                        when the mouse enters the area of the geometry.

                                                                                                                                                                                        • feature - The feature the mouse is over.
                                                                                                                                                                                        • lat_lng - The position of the cursor.

                                                                                                                                                                                        data_mouseup(feature, lat_lng)

                                                                                                                                                                                        for a mouseup on the geometry.

                                                                                                                                                                                        • feature - The feature the mouse is over.
                                                                                                                                                                                        • lat_lng - The position of the cursor.

                                                                                                                                                                                        data_removefeature(feature)

                                                                                                                                                                                        when a feature is removed from the collection.

                                                                                                                                                                                        • feature - The feature that was removed.

                                                                                                                                                                                        data_removeproperty(feature, name, old_value)

                                                                                                                                                                                        when a feature's property is removed.

                                                                                                                                                                                        • feature - The feature whose property was removed.
                                                                                                                                                                                        • name - The name of the property that was removed.
                                                                                                                                                                                        • old_value - The old value of the property that was removed.

                                                                                                                                                                                        data_rightclick(feature, lat_lng)

                                                                                                                                                                                        for a right-click on the geometry.

                                                                                                                                                                                        • feature - The feature that was right-clicked.
                                                                                                                                                                                        • lat_lng - The position that was right-clicked.

                                                                                                                                                                                        data_setgeometry(feature, new_geometry, old_geometry)

                                                                                                                                                                                        when a feature's geometry is set.

                                                                                                                                                                                        • feature - The feature that was removed.
                                                                                                                                                                                        • new_geometry - The geometry that was set.
                                                                                                                                                                                        • old_geometry - The geometry that was replaced.

                                                                                                                                                                                        data_setproperty(feature, name, new_value, old_value)

                                                                                                                                                                                        when a feature's property is set.

                                                                                                                                                                                        • feature - The feature whose property was set.
                                                                                                                                                                                        • name - The name of the property that was set.
                                                                                                                                                                                        • new_value - The new value of the property that was set.
                                                                                                                                                                                        • old_value - The old value of the property that was set.

                                                                                                                                                                                        show()

                                                                                                                                                                                        When the GoogleMap is shown on the screen

                                                                                                                                                                                        hide()

                                                                                                                                                                                        When the GoogleMap is removed from the screen


                                                                                                                                                                                        GoogleMap.AbstractOverlay (more info)

                                                                                                                                                                                        Create a new ‘AbstractOverlay’ object


                                                                                                                                                                                        Base class: anvil.Component

                                                                                                                                                                                        Constructor

                                                                                                                                                                                        GoogleMap.AbstractOverlay([clickable=], [draggable=], [visible=], [z_index=])

                                                                                                                                                                                          GoogleMap.AbstractOverlay Methods

                                                                                                                                                                                          add_component(map_component) → anvil.Component instance

                                                                                                                                                                                          Add a map component to this GoogleMap

                                                                                                                                                                                            add_event_handler(event_name, handler_func)

                                                                                                                                                                                            Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                              fit_bounds(lat_lng_bounds, [padding])

                                                                                                                                                                                              Sets the viewport to contain the given bounds. Adds some padding around the bounds by default - set padding to 0 to match the bounds exactly.

                                                                                                                                                                                                get_bounds() → anvil.GoogleMap.LatLngBounds instance

                                                                                                                                                                                                Returns the lat/lng bounds of the current viewport.

                                                                                                                                                                                                pan_by(dx, dy)

                                                                                                                                                                                                Changes the center of the map by the given distance in pixels.

                                                                                                                                                                                                  pan_to(position)

                                                                                                                                                                                                  Changes the center of the map to the given LatLng position.

                                                                                                                                                                                                    pan_to_bounds(lat_lng_bounds, [padding])

                                                                                                                                                                                                    Pans the map by the minimum amount necessary to contain the given LatLngBounds. Adds some padding around the bounds by default - set padding to 0 to match the bounds exactly.

                                                                                                                                                                                                      remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                      Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                        set_event_handler(event_name, handler_func)

                                                                                                                                                                                                        Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                          GoogleMap.AbstractOverlay Properties

                                                                                                                                                                                                          clickable - boolean

                                                                                                                                                                                                          True if this overlay raises mouse events.

                                                                                                                                                                                                          draggable - boolean

                                                                                                                                                                                                          True if this overlay can be dragged.

                                                                                                                                                                                                          parent

                                                                                                                                                                                                          visible - boolean

                                                                                                                                                                                                          True if this overlay should be displayed.

                                                                                                                                                                                                          z_index - number

                                                                                                                                                                                                          The z-index compared to other overlays.


                                                                                                                                                                                                          GoogleMap.AbstractOverlay Events

                                                                                                                                                                                                          show()

                                                                                                                                                                                                          When the anvil.GoogleMap.AbstractOverlay is shown on the screen

                                                                                                                                                                                                          hide()

                                                                                                                                                                                                          When the anvil.GoogleMap.AbstractOverlay is removed from the screen

                                                                                                                                                                                                          click(lat_lng)

                                                                                                                                                                                                          when an overlay is clicked.

                                                                                                                                                                                                          • lat_lng - The position that was clicked.

                                                                                                                                                                                                          dblclick(lat_lng)

                                                                                                                                                                                                          when an overlay is double clicked.

                                                                                                                                                                                                          • lat_lng - The position that was double-clicked.

                                                                                                                                                                                                          drag(lat_lng)

                                                                                                                                                                                                          while the user drags an overlay.

                                                                                                                                                                                                          • lat_lng - The position of the cursor.

                                                                                                                                                                                                          dragend(lat_lng)

                                                                                                                                                                                                          when the user stops dragging an overlay.

                                                                                                                                                                                                          • lat_lng - The position of the cursor.

                                                                                                                                                                                                          dragstart(lat_lng)

                                                                                                                                                                                                          when the user starts dragging an overlay.

                                                                                                                                                                                                          • lat_lng - The position of the cursor.

                                                                                                                                                                                                          mousedown(lat_lng)

                                                                                                                                                                                                          for a mousedown on an overlay.

                                                                                                                                                                                                          • lat_lng - The position of the cursor.

                                                                                                                                                                                                          mouseout(lat_lng)

                                                                                                                                                                                                          when the mouse leaves the area of an overlay icon.

                                                                                                                                                                                                          • lat_lng - The position of the cursor.

                                                                                                                                                                                                          mouseover(lat_lng)

                                                                                                                                                                                                          when the mouse enters the area of an overlay icon.

                                                                                                                                                                                                          • lat_lng - The position of the cursor.

                                                                                                                                                                                                          mouseup(lat_lng)

                                                                                                                                                                                                          for a mouseup on an overlay.

                                                                                                                                                                                                          • lat_lng - The position of the cursor.

                                                                                                                                                                                                          rightclick(lat_lng)

                                                                                                                                                                                                          for a right-click on an overlay.

                                                                                                                                                                                                          • lat_lng - The position of the cursor.


                                                                                                                                                                                                          GoogleMap.Animation

                                                                                                                                                                                                          An object containing pre-defined animations for use with Markers.

                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                          GoogleMap.Animation()

                                                                                                                                                                                                          GoogleMap.Circle (more info)

                                                                                                                                                                                                          Create a new ‘Circle’ object


                                                                                                                                                                                                          Base class: anvil.GoogleMap.AbstractOverlay

                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                          GoogleMap.Circle([center=], [radius=], [editable=], [stroke_color=], [stroke_opacity=], [stroke_weight=], [stroke_position=], [fill_color=], [fill_opacity=], [clickable=], [draggable=], [visible=], [z_index=])

                                                                                                                                                                                                            GoogleMap.Circle Methods

                                                                                                                                                                                                            add_event_handler(event_name, handler_func)

                                                                                                                                                                                                            Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                              remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                              Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                  GoogleMap.Circle Properties

                                                                                                                                                                                                                  center - anvil.GoogleMap.LatLng instance

                                                                                                                                                                                                                  The center of the Circle.

                                                                                                                                                                                                                  editable - boolean

                                                                                                                                                                                                                  True if this overlay can be edited by the user.

                                                                                                                                                                                                                  fill_color - string

                                                                                                                                                                                                                  The color to draw the overlay outline.

                                                                                                                                                                                                                  fill_opacity - number

                                                                                                                                                                                                                  The opacity of the overlay outline.

                                                                                                                                                                                                                  parent

                                                                                                                                                                                                                  radius - number

                                                                                                                                                                                                                  The radius of the Circle.

                                                                                                                                                                                                                  stroke_color - string

                                                                                                                                                                                                                  The color to draw the overlay outline.

                                                                                                                                                                                                                  stroke_opacity - number

                                                                                                                                                                                                                  The opacity of the overlay outline.

                                                                                                                                                                                                                  stroke_position - anvil.GoogleMap.StrokePosition

                                                                                                                                                                                                                  The stroke position. Defaults to CENTER.

                                                                                                                                                                                                                  stroke_weight - number

                                                                                                                                                                                                                  The weight of the overlay outline


                                                                                                                                                                                                                  GoogleMap.Circle Events

                                                                                                                                                                                                                  center_changed()

                                                                                                                                                                                                                  When the center position of this circle changes, i.e. when it is moved.

                                                                                                                                                                                                                  radius_changed()

                                                                                                                                                                                                                  When the radius of this circle changes, i.e. when it is resized.


                                                                                                                                                                                                                  GoogleMap.ControlPosition

                                                                                                                                                                                                                  An object containing pre-defined control positions.

                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                  GoogleMap.ControlPosition()

                                                                                                                                                                                                                  GoogleMap.Data

                                                                                                                                                                                                                  Create a new Data object with the specified options. Not fully implemented.

                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                  GoogleMap.Data()

                                                                                                                                                                                                                  Instance Methods

                                                                                                                                                                                                                  add([feature], geometry=, id=, properties=) → anvil.GoogleMap.Data.Feature instance

                                                                                                                                                                                                                  Adds a feature to the collection, and returns the added feature.

                                                                                                                                                                                                                    add_geo_json(geo_json, [id_property_name=id]) → list(anvil.GoogleMap.Data.Feature instance)

                                                                                                                                                                                                                    Adds GeoJSON features to the collection. Give this method a parsed JSON. The imported features are returned.

                                                                                                                                                                                                                      contains(feature) → boolean

                                                                                                                                                                                                                      Checks whether the given feature is in the collection.

                                                                                                                                                                                                                        get_feature_by_id(id) → anvil.GoogleMap.Data.Feature instance

                                                                                                                                                                                                                        Returns the feature with the given ID, if it exists in the collection.

                                                                                                                                                                                                                          load_geo_json(url, [id_property_name=id])

                                                                                                                                                                                                                          Loads GeoJSON from a URL, and adds the features to the collection.

                                                                                                                                                                                                                            override_style(feature, clickable=, cursor=, draggable=, editable=, fillColor=, fillOpacity=, icon=, shape=, strokeColor=, strokeOpacity=, strokeWeight=, title=, visible=, zIndex=)

                                                                                                                                                                                                                            Sets the style for all features in the collection. Styles specified on a per-feature basis via override_style() continue to apply.

                                                                                                                                                                                                                              remove(feature)

                                                                                                                                                                                                                              Removes a feature from the collection.

                                                                                                                                                                                                                                revert_style(feature)

                                                                                                                                                                                                                                Removes the effect of previous override_style() calls. The style of the given feature reverts to the style specified by set_style().

                                                                                                                                                                                                                                  to_geo_json() → string

                                                                                                                                                                                                                                  Exports the features in the collection to a GeoJSON object.


                                                                                                                                                                                                                                  GoogleMap.Data Attributes

                                                                                                                                                                                                                                  control_position - anvil.GoogleMap.ControlPosition

                                                                                                                                                                                                                                  The position of the drawing controls on the map.

                                                                                                                                                                                                                                  controls - list(string)

                                                                                                                                                                                                                                  Describes which drawing modes are available for the user to select, in the order they are displayed. Possible drawing modes are “Point”, “LineString” or “Polygon”.

                                                                                                                                                                                                                                  drawing_mode - string

                                                                                                                                                                                                                                  The current drawing mode of the given Data layer. Possible drawing modes are “Point”, “LineString” or “Polygon”.

                                                                                                                                                                                                                                  style - anvil.GoogleMap.Data.StyleOptions instance

                                                                                                                                                                                                                                  Style for all features in the collection. May be a styling function or a GoogleMap.Data.StyleOptions object.


                                                                                                                                                                                                                                  GoogleMap.Data.Feature

                                                                                                                                                                                                                                  Create a new Feature.

                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                  GoogleMap.Data.Feature([geometry=None], [id=None], [properties=None])

                                                                                                                                                                                                                                    Instance Methods

                                                                                                                                                                                                                                    to_geo_json() → string

                                                                                                                                                                                                                                    Exports this feature as a GeoJSON object.


                                                                                                                                                                                                                                    GoogleMap.Data.Feature Attributes

                                                                                                                                                                                                                                    geometry - anvil.GoogleMap.Data.Geometry instance

                                                                                                                                                                                                                                    The feature geometry.

                                                                                                                                                                                                                                    id - string

                                                                                                                                                                                                                                    Feature ID is optional.


                                                                                                                                                                                                                                    GoogleMap.Data.Geometry

                                                                                                                                                                                                                                    Create a new ‘Geometry’ object

                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                    GoogleMap.Data.Geometry()

                                                                                                                                                                                                                                    Instance Methods

                                                                                                                                                                                                                                    get_type() → string

                                                                                                                                                                                                                                    Returns the type of the geometry object.


                                                                                                                                                                                                                                    GoogleMap.Data.GeometryCollection

                                                                                                                                                                                                                                    Constructs a Data.GeometryCollection from the given geometry objects or LatLngs.


                                                                                                                                                                                                                                    Base class: anvil.GoogleMap.Data.Geometry

                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                    GoogleMap.Data.GeometryCollection(points)

                                                                                                                                                                                                                                      Instance Methods

                                                                                                                                                                                                                                      get_array() → list(anvil.GoogleMap.Data.Geometry instance)

                                                                                                                                                                                                                                      Returns an array of the contained Geometries. A new array is returned each time get_array() is called.

                                                                                                                                                                                                                                      get_at(n) → anvil.GoogleMap.Data.Geometry instance

                                                                                                                                                                                                                                      Returns the n-th contained Geometry.

                                                                                                                                                                                                                                        get_length() → number

                                                                                                                                                                                                                                        Returns the number of contained Geometries.


                                                                                                                                                                                                                                        GoogleMap.Data.LinearRing

                                                                                                                                                                                                                                        Constructs a Data.LinearRing from the given LatLngs


                                                                                                                                                                                                                                        Base class: anvil.GoogleMap.Data.Geometry

                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                        GoogleMap.Data.LinearRing(points)

                                                                                                                                                                                                                                          Instance Methods

                                                                                                                                                                                                                                          get_array() → list(anvil.GoogleMap.LatLng instance)

                                                                                                                                                                                                                                          Returns an array of the contained LatLngs. A new array is returned each time get_array() is called.

                                                                                                                                                                                                                                          get_at(n) → anvil.GoogleMap.LatLng instance

                                                                                                                                                                                                                                          Returns the n-th contained LatLng.

                                                                                                                                                                                                                                            get_length() → number

                                                                                                                                                                                                                                            Returns the number of contained LatLngs.


                                                                                                                                                                                                                                            GoogleMap.Data.LineString

                                                                                                                                                                                                                                            Create a new LineString geometry from the specified points.


                                                                                                                                                                                                                                            Base class: anvil.GoogleMap.Data.Geometry

                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                            GoogleMap.Data.LineString(points)

                                                                                                                                                                                                                                              Instance Methods

                                                                                                                                                                                                                                              get_array() → list(anvil.GoogleMap.LatLng instance)

                                                                                                                                                                                                                                              Returns an array of the contained LatLngs. A new array is returned each time get_array() is called.

                                                                                                                                                                                                                                              get_at(n) → anvil.GoogleMap.LatLng instance

                                                                                                                                                                                                                                              Returns the n-th contained LatLng.

                                                                                                                                                                                                                                                get_length() → number

                                                                                                                                                                                                                                                Returns the number of contained LatLngs.


                                                                                                                                                                                                                                                GoogleMap.Data.MultiLineString

                                                                                                                                                                                                                                                Constructs a Data.MultiLineString from the given Data.LineStrings or arrays of positions.


                                                                                                                                                                                                                                                Base class: anvil.GoogleMap.Data.Geometry

                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                GoogleMap.Data.MultiLineString(points)

                                                                                                                                                                                                                                                  Instance Methods

                                                                                                                                                                                                                                                  get_array() → list(anvil.GoogleMap.Data.LineString instance)

                                                                                                                                                                                                                                                  Returns an array of the contained Data.LineStrings. A new array is returned each time get_array() is called.

                                                                                                                                                                                                                                                  get_at(n) → anvil.GoogleMap.Data.LineString

                                                                                                                                                                                                                                                  Returns the n-th contained Data.LineString.

                                                                                                                                                                                                                                                    get_length() → number

                                                                                                                                                                                                                                                    Returns the number of contained Data.LineStrings.


                                                                                                                                                                                                                                                    GoogleMap.Data.MultiPoint

                                                                                                                                                                                                                                                    Create a new MultiPoint geometry containing the specified points.


                                                                                                                                                                                                                                                    Base class: anvil.GoogleMap.Data.Geometry

                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                    GoogleMap.Data.MultiPoint(points)

                                                                                                                                                                                                                                                      Instance Methods

                                                                                                                                                                                                                                                      get_array() → list(anvil.GoogleMap.LatLng instance)

                                                                                                                                                                                                                                                      Returns an array of the contained LatLngs. A new array is returned each time get_array() is called.

                                                                                                                                                                                                                                                      get_at(n) → anvil.GoogleMap.LatLng instance

                                                                                                                                                                                                                                                      Returns the n-th contained LatLng.

                                                                                                                                                                                                                                                        get_length() → number

                                                                                                                                                                                                                                                        Returns the number of contained LatLngs.


                                                                                                                                                                                                                                                        GoogleMap.Data.MultiPolygon

                                                                                                                                                                                                                                                        Constructs a Data.MultiPolygon from the given Polygons or arrays of positions.


                                                                                                                                                                                                                                                        Base class: anvil.GoogleMap.Data.Geometry

                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                        GoogleMap.Data.MultiPolygon(points)

                                                                                                                                                                                                                                                          Instance Methods

                                                                                                                                                                                                                                                          get_array() → list(anvil.GoogleMap.Data.Polygon instance)

                                                                                                                                                                                                                                                          Returns an array of the contained Polygons. A new array is returned each time get_array() is called.

                                                                                                                                                                                                                                                          get_at(n) → anvil.GoogleMap.Data.Polygon instance

                                                                                                                                                                                                                                                          Returns the n-th contained Polygon.

                                                                                                                                                                                                                                                            get_length() → number

                                                                                                                                                                                                                                                            Returns the number of contained Polygons.


                                                                                                                                                                                                                                                            GoogleMap.Data.Point

                                                                                                                                                                                                                                                            Create a new Point at the specified position.


                                                                                                                                                                                                                                                            Base class: anvil.GoogleMap.Data.Geometry

                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                            GoogleMap.Data.Point(lat_lng)

                                                                                                                                                                                                                                                              Instance Methods

                                                                                                                                                                                                                                                              get() → anvil.GoogleMap.LatLng instance

                                                                                                                                                                                                                                                              Returns the contained LatLng.


                                                                                                                                                                                                                                                              GoogleMap.Data.Polygon

                                                                                                                                                                                                                                                              Constructs a Data.Polygon from the given LinearRings or arrays of positions.


                                                                                                                                                                                                                                                              Base class: anvil.GoogleMap.Data.Geometry

                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                              GoogleMap.Data.Polygon(points)

                                                                                                                                                                                                                                                                Instance Methods

                                                                                                                                                                                                                                                                get_array() → list(anvil.GoogleMap.Data.LinearRing instance)

                                                                                                                                                                                                                                                                Returns an array of the contained LinearRings. A new array is returned each time get_array() is called.

                                                                                                                                                                                                                                                                get_at(n) → anvil.GoogleMap.Data.LinearRing instance

                                                                                                                                                                                                                                                                Returns the n-th contained LinearRing.

                                                                                                                                                                                                                                                                  get_length() → number

                                                                                                                                                                                                                                                                  Returns the number of contained LinearRings.


                                                                                                                                                                                                                                                                  GoogleMap.Data.StyleOptions

                                                                                                                                                                                                                                                                  Create a new ‘StyleOptions’ object

                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                  GoogleMap.Data.StyleOptions([StyleOptions=], [clickable=], [cursor=], [draggable=], [editable=], [fill_color=], [fill_opacity=], [icon=], [stroke_color=], [stroke_opacity=], [stroke_weight=], [title=], [visible=], [z_index=])

                                                                                                                                                                                                                                                                    GoogleMap.Data.StyleOptions Attributes

                                                                                                                                                                                                                                                                    clickable - boolean

                                                                                                                                                                                                                                                                    If true, the marker receives mouse and touch events. Default value is true.

                                                                                                                                                                                                                                                                    cursor - string

                                                                                                                                                                                                                                                                    Mouse cursor to show on hover. Only applies to point geometries.

                                                                                                                                                                                                                                                                    draggable - boolean

                                                                                                                                                                                                                                                                    If true, the object can be dragged across the map and the underlying feature will have its geometry updated.

                                                                                                                                                                                                                                                                    editable - boolean

                                                                                                                                                                                                                                                                    If true, the object can be edited by dragging control points and the underlying feature will have its geometry updated.

                                                                                                                                                                                                                                                                    fill_color - string

                                                                                                                                                                                                                                                                    The fill color.

                                                                                                                                                                                                                                                                    fill_opacity - number

                                                                                                                                                                                                                                                                    The fill opacity between 0.0 and 1.0.

                                                                                                                                                                                                                                                                    icon - anvil.GoogleMap.Symbol instance

                                                                                                                                                                                                                                                                    Icon for the foreground.

                                                                                                                                                                                                                                                                    stroke_color - string

                                                                                                                                                                                                                                                                    The stroke color.

                                                                                                                                                                                                                                                                    stroke_opacity - number

                                                                                                                                                                                                                                                                    The stroke opacity between 0.0 and 1.0.

                                                                                                                                                                                                                                                                    stroke_weight - number

                                                                                                                                                                                                                                                                    The stroke width in pixels.

                                                                                                                                                                                                                                                                    title - string

                                                                                                                                                                                                                                                                    Rollover text.

                                                                                                                                                                                                                                                                    visible - boolean

                                                                                                                                                                                                                                                                    Whether the feature is visible.

                                                                                                                                                                                                                                                                    z_index - number

                                                                                                                                                                                                                                                                    All features are displayed on the map in order of their zIndex, with higher values displaying in front of features with lower values.


                                                                                                                                                                                                                                                                    GoogleMap.FullscreenControlOptions

                                                                                                                                                                                                                                                                    Construct new FullscreenControlOptions with the specified options.

                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                    GoogleMap.FullscreenControlOptions([position=])

                                                                                                                                                                                                                                                                      GoogleMap.FullscreenControlOptions Attributes

                                                                                                                                                                                                                                                                      position - anvil.GoogleMap.ControlPosition

                                                                                                                                                                                                                                                                      Position of the controls.


                                                                                                                                                                                                                                                                      GoogleMap.GeocoderAddressComponent

                                                                                                                                                                                                                                                                      Create a new ‘GeocoderAddressComponent’ object

                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                      GoogleMap.GeocoderAddressComponent()

                                                                                                                                                                                                                                                                      GoogleMap.GeocoderAddressComponent Attributes

                                                                                                                                                                                                                                                                      long_name - string

                                                                                                                                                                                                                                                                      The full text of the address component

                                                                                                                                                                                                                                                                      short_name - string

                                                                                                                                                                                                                                                                      The abbreviated, short text of the given address component.

                                                                                                                                                                                                                                                                      types - list(string)

                                                                                                                                                                                                                                                                      An array of strings denoting the type of this address component.


                                                                                                                                                                                                                                                                      GoogleMap.GeocoderGeometry

                                                                                                                                                                                                                                                                      Create a new ‘GeocoderGeometry’ object

                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                      GoogleMap.GeocoderGeometry()

                                                                                                                                                                                                                                                                      GoogleMap.GeocoderGeometry Attributes

                                                                                                                                                                                                                                                                      bounds - anvil.GoogleMap.LatLngBounds instance

                                                                                                                                                                                                                                                                      The precise bounds of this GeocoderResult, if applicable.

                                                                                                                                                                                                                                                                      location - anvil.GoogleMap.LatLng instance

                                                                                                                                                                                                                                                                      The latitude/longitude coordinates of this result.

                                                                                                                                                                                                                                                                      location_type - anvil.GoogleMap.GeocoderLocationType

                                                                                                                                                                                                                                                                      The type of location returned.

                                                                                                                                                                                                                                                                      viewport - anvil.GoogleMap.LatLngBounds instance

                                                                                                                                                                                                                                                                      The bounds of the recommended viewport for displaying this GeocoderResult.


                                                                                                                                                                                                                                                                      GoogleMap.GeocoderLocationType

                                                                                                                                                                                                                                                                      Describes the type of location returned from a geocode.

                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                      GoogleMap.GeocoderLocationType()

                                                                                                                                                                                                                                                                      GoogleMap.GeocoderResult

                                                                                                                                                                                                                                                                      Create a new ‘GeocoderResult’ object

                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                      GoogleMap.GeocoderResult()

                                                                                                                                                                                                                                                                      GoogleMap.GeocoderResult Attributes

                                                                                                                                                                                                                                                                      address_components - list(anvil.GoogleMap.GeocoderAddressComponent instance)

                                                                                                                                                                                                                                                                      An array of GeocoderAddressComponents

                                                                                                                                                                                                                                                                      formatted_address - string

                                                                                                                                                                                                                                                                      A string containing the human-readable address of this location.

                                                                                                                                                                                                                                                                      geometry - anvil.GoogleMap.GeocoderGeometry instance

                                                                                                                                                                                                                                                                      A GeocoderGeometry object

                                                                                                                                                                                                                                                                      partial_match - boolean

                                                                                                                                                                                                                                                                      Whether the geocoder did not return an exact match for the original request, though it was able to match part of the requested address.

                                                                                                                                                                                                                                                                      place_id - string

                                                                                                                                                                                                                                                                      The place ID associated with the location. Place IDs uniquely identify a place in the Google Places database and on Google Maps.

                                                                                                                                                                                                                                                                      postcode_localities - list(string)

                                                                                                                                                                                                                                                                      An array of strings denoting all the localities contained in a postal code. This is only present when the result is a postal code that contains multiple localities.

                                                                                                                                                                                                                                                                      types - list(string)

                                                                                                                                                                                                                                                                      An array of strings denoting the type of the returned geocoded element.


                                                                                                                                                                                                                                                                      GoogleMap.Icon

                                                                                                                                                                                                                                                                      Construct an Icon with the specified options.

                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                      GoogleMap.Icon([anchor=], [label_origin=], [origin=], [scaled_size=], [size=], [url=])

                                                                                                                                                                                                                                                                        GoogleMap.Icon Attributes

                                                                                                                                                                                                                                                                        anchor - anvil.GoogleMap.Point instance

                                                                                                                                                                                                                                                                        The position at which to anchor an image in correspondence to the location of the marker on the map. By default, the anchor is located along the center point of the bottom of the image.

                                                                                                                                                                                                                                                                        label_origin - anvil.GoogleMap.Point instance

                                                                                                                                                                                                                                                                        The origin of the label relative to the top-left corner of the icon image, if a label is supplied by the marker. By default, the origin is located in the center point of the image.

                                                                                                                                                                                                                                                                        origin - anvil.GoogleMap.Point instance

                                                                                                                                                                                                                                                                        The position of the image within a sprite, if any. By default, the origin is located at the top left corner of the image (0, 0).

                                                                                                                                                                                                                                                                        scaled_size - anvil.GoogleMap.Size instance

                                                                                                                                                                                                                                                                        The size of the entire image after scaling, if any. Use this property to stretch/shrink an image or a sprite.

                                                                                                                                                                                                                                                                        size - anvil.GoogleMap.Size instance

                                                                                                                                                                                                                                                                        The display size of the sprite or image. When using sprites, you must specify the sprite size. If the size is not provided, it will be set when the image loads.

                                                                                                                                                                                                                                                                        url - string

                                                                                                                                                                                                                                                                        The URL of the image or sprite sheet.


                                                                                                                                                                                                                                                                        GoogleMap.IconSequence

                                                                                                                                                                                                                                                                        Construct a new IconSequence with the specified options.

                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                        GoogleMap.IconSequence([icon=], [fixed_rotation=], [offset=], [repeat=])

                                                                                                                                                                                                                                                                          GoogleMap.IconSequence Attributes

                                                                                                                                                                                                                                                                          fixed_rotation - boolean

                                                                                                                                                                                                                                                                          If true, each icon in the sequence has the same fixed rotation regardless of the angle of the edge on which it lies. Defaults to false.

                                                                                                                                                                                                                                                                          icon - anvil.GoogleMap.Symbol instance

                                                                                                                                                                                                                                                                          The icon to render on the line.

                                                                                                                                                                                                                                                                          offset - number

                                                                                                                                                                                                                                                                          The distance from the start of the line at which an icon is to be rendered.

                                                                                                                                                                                                                                                                          repeat - string

                                                                                                                                                                                                                                                                          The distance between consecutive icons on the line.


                                                                                                                                                                                                                                                                          GoogleMap.InfoWindow (more info)

                                                                                                                                                                                                                                                                          Create a new ‘InfoWindow’ object


                                                                                                                                                                                                                                                                          Base class: anvil.Component

                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                          GoogleMap.InfoWindow([content=], [disable_auto_pan=], [max_width=], [pixel_offset=], [position=], [z_index=])

                                                                                                                                                                                                                                                                            GoogleMap.InfoWindow Methods

                                                                                                                                                                                                                                                                            add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                            Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                              close()

                                                                                                                                                                                                                                                                              Hide this InfoWindow. The user can also cause this to happen by clicking the close button in the top-right of the popup.

                                                                                                                                                                                                                                                                                open(map, [anchor])

                                                                                                                                                                                                                                                                                Display this InfoWindow on the specified map. If anchor is specified, the InfoWindow does not need to have its own position property set.

                                                                                                                                                                                                                                                                                  remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                  Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                    set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                    Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                      GoogleMap.InfoWindow Properties

                                                                                                                                                                                                                                                                                      content - anvil.Component instance

                                                                                                                                                                                                                                                                                      Content to display in the InfoWindow. Can be a string or an Anvil Component

                                                                                                                                                                                                                                                                                      disable_auto_pan - boolean

                                                                                                                                                                                                                                                                                      Disable auto-pan on open.

                                                                                                                                                                                                                                                                                      max_width - number

                                                                                                                                                                                                                                                                                      Maximum width of the infowindow, regardless of content’s width.

                                                                                                                                                                                                                                                                                      parent

                                                                                                                                                                                                                                                                                      pixel_offset - anvil.GoogleMap.Size instance

                                                                                                                                                                                                                                                                                      The offset, in pixels, of the tip of the info window from the point on the map at whose geographical coordinates the info window is anchored.

                                                                                                                                                                                                                                                                                      position - anvil.GoogleMap.LatLng instance

                                                                                                                                                                                                                                                                                      The LatLng at which to display this InfoWindow. Not required if this popup is anchored to a component

                                                                                                                                                                                                                                                                                      z_index - number

                                                                                                                                                                                                                                                                                      All InfoWindows are displayed on the map in order of their zIndex, with higher values displaying in front of InfoWindows with lower values.


                                                                                                                                                                                                                                                                                      GoogleMap.InfoWindow Events

                                                                                                                                                                                                                                                                                      show()

                                                                                                                                                                                                                                                                                      When the anvil.GoogleMap.InfoWindow is shown on the screen

                                                                                                                                                                                                                                                                                      hide()

                                                                                                                                                                                                                                                                                      When the anvil.GoogleMap.InfoWindow is removed from the screen


                                                                                                                                                                                                                                                                                      GoogleMap.LatLng

                                                                                                                                                                                                                                                                                      Create a new LatLng object at the specified latitude and longitude.

                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                      GoogleMap.LatLng(lat, lng)

                                                                                                                                                                                                                                                                                        Instance Methods

                                                                                                                                                                                                                                                                                        lat() → number

                                                                                                                                                                                                                                                                                        Returns the latitude in degrees.

                                                                                                                                                                                                                                                                                          lng() → number

                                                                                                                                                                                                                                                                                          Returns the longitude in degrees.


                                                                                                                                                                                                                                                                                            GoogleMap.LatLngBounds

                                                                                                                                                                                                                                                                                            Create a new LatLngBounds object with the specified corners.

                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                            GoogleMap.LatLngBounds(south_west, north_east)

                                                                                                                                                                                                                                                                                              Instance Methods

                                                                                                                                                                                                                                                                                              contains(point) → boolean

                                                                                                                                                                                                                                                                                              Returns True if the given lat/lng is in this bounds.

                                                                                                                                                                                                                                                                                                equals(other) → boolean

                                                                                                                                                                                                                                                                                                Returns True if this bounds approximately equals the given bounds.

                                                                                                                                                                                                                                                                                                  extend(point)

                                                                                                                                                                                                                                                                                                  Extends this bounds to contain the given point.

                                                                                                                                                                                                                                                                                                    get_center() → anvil.GoogleMap.LatLng instance

                                                                                                                                                                                                                                                                                                    Computes the center of this LatLngBounds

                                                                                                                                                                                                                                                                                                      get_north_east() → anvil.GoogleMap.LatLng instance

                                                                                                                                                                                                                                                                                                      Returns the north-east corner of this bounds.

                                                                                                                                                                                                                                                                                                        get_south_west() → anvil.GoogleMap.LatLng instance

                                                                                                                                                                                                                                                                                                        Returns the south-west corner of this bounds.

                                                                                                                                                                                                                                                                                                          intersects(other) → boolean

                                                                                                                                                                                                                                                                                                          Returns True if this bounds shares any points with the other bounds.

                                                                                                                                                                                                                                                                                                            is_empty() → boolean

                                                                                                                                                                                                                                                                                                            Returns True if the bounds are empty.

                                                                                                                                                                                                                                                                                                              to_json() → string

                                                                                                                                                                                                                                                                                                              Converts to JSON representation.

                                                                                                                                                                                                                                                                                                                to_span() → anvil.GoogleMap.LatLng instance

                                                                                                                                                                                                                                                                                                                Converts the given map bounds to a lat/lng span.

                                                                                                                                                                                                                                                                                                                  to_url_value(precision=6) → string

                                                                                                                                                                                                                                                                                                                  Returns a string of the form ’lat_lo,lng_lo,lat_hi,lng_hi’ for this bounds.

                                                                                                                                                                                                                                                                                                                    union(other) → anvil.GoogleMap.LatLngBounds instance

                                                                                                                                                                                                                                                                                                                    Extends this bounds to contain the union of this and the given bounds.


                                                                                                                                                                                                                                                                                                                      GoogleMap.LatLngBoundsLiteral

                                                                                                                                                                                                                                                                                                                      Construct a LatLngBoundsLiteral with the specified edges.

                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                      GoogleMap.LatLngBoundsLiteral([north=], [east=], [south=], [west=])

                                                                                                                                                                                                                                                                                                                        GoogleMap.LatLngBoundsLiteral Attributes

                                                                                                                                                                                                                                                                                                                        east - number

                                                                                                                                                                                                                                                                                                                        The longitude of the east edge of the bounds, in degrees.

                                                                                                                                                                                                                                                                                                                        north - number

                                                                                                                                                                                                                                                                                                                        The latitude of the north edge of the bounds, in degrees.

                                                                                                                                                                                                                                                                                                                        south - number

                                                                                                                                                                                                                                                                                                                        The latitude of the south edge of the bounds, in degrees.

                                                                                                                                                                                                                                                                                                                        west - number

                                                                                                                                                                                                                                                                                                                        The longitude of the west edge of the bounds, in degrees.


                                                                                                                                                                                                                                                                                                                        GoogleMap.LatLngLiteral

                                                                                                                                                                                                                                                                                                                        Create a new LatLngLiteral object at the specified latitude and longitude.

                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                        GoogleMap.LatLngLiteral([lat=], [lng=])

                                                                                                                                                                                                                                                                                                                          GoogleMap.LatLngLiteral Attributes

                                                                                                                                                                                                                                                                                                                          lat - number

                                                                                                                                                                                                                                                                                                                          The latitude in degrees.

                                                                                                                                                                                                                                                                                                                          lng - number

                                                                                                                                                                                                                                                                                                                          The longitude in degrees.


                                                                                                                                                                                                                                                                                                                          GoogleMap.MapTypeControlOptions

                                                                                                                                                                                                                                                                                                                          Construct new MapTypeControlOptions with the specified options.

                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                          GoogleMap.MapTypeControlOptions([position=], [style=], [map_type_ids=])

                                                                                                                                                                                                                                                                                                                            GoogleMap.MapTypeControlOptions Attributes

                                                                                                                                                                                                                                                                                                                            map_type_ids - list(string)

                                                                                                                                                                                                                                                                                                                            IDs of map types to show in the control.

                                                                                                                                                                                                                                                                                                                            position - anvil.GoogleMap.ControlPosition

                                                                                                                                                                                                                                                                                                                            Position of the controls.

                                                                                                                                                                                                                                                                                                                            style - anvil.GoogleMap.MapTypeControlStyle

                                                                                                                                                                                                                                                                                                                            Used to select what style of map type control to display.


                                                                                                                                                                                                                                                                                                                            GoogleMap.MapTypeControlStyle

                                                                                                                                                                                                                                                                                                                            An object containing pre-defined control styles.

                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                            GoogleMap.MapTypeControlStyle()

                                                                                                                                                                                                                                                                                                                            GoogleMap.MapTypeId

                                                                                                                                                                                                                                                                                                                            An object containing pre-defined map types.

                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                            GoogleMap.MapTypeId()

                                                                                                                                                                                                                                                                                                                            GoogleMap.Marker (more info)

                                                                                                                                                                                                                                                                                                                            Create a new ‘Marker’ object


                                                                                                                                                                                                                                                                                                                            Base class: anvil.GoogleMap.AbstractOverlay

                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                            GoogleMap.Marker([animation=], [position=], [icon=], [label=], [title=], [cursor=], [opacity=], [clickable=], [draggable=], [visible=], [z_index=])

                                                                                                                                                                                                                                                                                                                              GoogleMap.Marker Methods

                                                                                                                                                                                                                                                                                                                              add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                              Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                  set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                  Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                    GoogleMap.Marker Properties

                                                                                                                                                                                                                                                                                                                                    animation - anvil.GoogleMap.Animation

                                                                                                                                                                                                                                                                                                                                    The animation of this Marker.

                                                                                                                                                                                                                                                                                                                                    cursor - string

                                                                                                                                                                                                                                                                                                                                    The cursor to display over this Marker.

                                                                                                                                                                                                                                                                                                                                    icon - anvil.GoogleMap.Symbol instance

                                                                                                                                                                                                                                                                                                                                    The icon to display at the position of this Marker.

                                                                                                                                                                                                                                                                                                                                    label - anvil.GoogleMap.MarkerLabel instance

                                                                                                                                                                                                                                                                                                                                    The label to display on this Marker.

                                                                                                                                                                                                                                                                                                                                    opacity - number

                                                                                                                                                                                                                                                                                                                                    The opacity of this Marker.

                                                                                                                                                                                                                                                                                                                                    parent

                                                                                                                                                                                                                                                                                                                                    position - anvil.GoogleMap.LatLng instance

                                                                                                                                                                                                                                                                                                                                    The LatLng position of this Marker

                                                                                                                                                                                                                                                                                                                                    title - string

                                                                                                                                                                                                                                                                                                                                    The tooltip text for this Marker.


                                                                                                                                                                                                                                                                                                                                    GoogleMap.Marker Events

                                                                                                                                                                                                                                                                                                                                    animation_changed()

                                                                                                                                                                                                                                                                                                                                    When the animation of this Marker changes.

                                                                                                                                                                                                                                                                                                                                    clickable_changed()

                                                                                                                                                                                                                                                                                                                                    When the 'clickable' property of this Marker changes.

                                                                                                                                                                                                                                                                                                                                    cursor_changed()

                                                                                                                                                                                                                                                                                                                                    When the 'cursor' property of this Marker changes.

                                                                                                                                                                                                                                                                                                                                    draggable_changed()

                                                                                                                                                                                                                                                                                                                                    When the 'draggable' property of this Marker changes.

                                                                                                                                                                                                                                                                                                                                    icon_changed()

                                                                                                                                                                                                                                                                                                                                    When the 'icon' property of this Marker changes.

                                                                                                                                                                                                                                                                                                                                    position_changed()

                                                                                                                                                                                                                                                                                                                                    When the position of this Marker changes, i.e. when it is moved.

                                                                                                                                                                                                                                                                                                                                    shape_changed()

                                                                                                                                                                                                                                                                                                                                    When the 'shape' property of this Marker changes, i.e. when it is moved.

                                                                                                                                                                                                                                                                                                                                    title_changed()

                                                                                                                                                                                                                                                                                                                                    When the 'title' property of this Marker changes, i.e. when it is moved.

                                                                                                                                                                                                                                                                                                                                    visible_changed()

                                                                                                                                                                                                                                                                                                                                    When the 'visible' property of this Marker changes, i.e. when it is moved.

                                                                                                                                                                                                                                                                                                                                    z_index_changed()

                                                                                                                                                                                                                                                                                                                                    When the 'z_index' property of this Marker changes, i.e. when it is moved.


                                                                                                                                                                                                                                                                                                                                    GoogleMap.MarkerLabel

                                                                                                                                                                                                                                                                                                                                    Construct a new MarkerLabel with the specified options.

                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                    GoogleMap.MarkerLabel([color=], [font_family=], [font_size=], [font_weight=], [text=])

                                                                                                                                                                                                                                                                                                                                      GoogleMap.MarkerLabel Attributes

                                                                                                                                                                                                                                                                                                                                      color - string

                                                                                                                                                                                                                                                                                                                                      The color of the label text. Default color is black.

                                                                                                                                                                                                                                                                                                                                      font_family - string

                                                                                                                                                                                                                                                                                                                                      The font family of the label text.

                                                                                                                                                                                                                                                                                                                                      font_size - string

                                                                                                                                                                                                                                                                                                                                      The font size of the label text.

                                                                                                                                                                                                                                                                                                                                      font_weight - string

                                                                                                                                                                                                                                                                                                                                      The font weight of the label text.

                                                                                                                                                                                                                                                                                                                                      text - string

                                                                                                                                                                                                                                                                                                                                      The text to be displayed in the label.


                                                                                                                                                                                                                                                                                                                                      GoogleMap.MotionTrackingControlOptions

                                                                                                                                                                                                                                                                                                                                      Construct new MotionTrackingControlOptions with the specified options.

                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                      GoogleMap.MotionTrackingControlOptions([position=])

                                                                                                                                                                                                                                                                                                                                        GoogleMap.MotionTrackingControlOptions Attributes

                                                                                                                                                                                                                                                                                                                                        position - anvil.GoogleMap.ControlPosition

                                                                                                                                                                                                                                                                                                                                        Position of the controls.


                                                                                                                                                                                                                                                                                                                                        GoogleMap.Point

                                                                                                                                                                                                                                                                                                                                        Create a new Point at the specified coordinates.

                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                        GoogleMap.Point(x, y)

                                                                                                                                                                                                                                                                                                                                          GoogleMap.Polygon (more info)

                                                                                                                                                                                                                                                                                                                                          Create a new ‘Polygon’ object


                                                                                                                                                                                                                                                                                                                                          Base class: anvil.GoogleMap.AbstractOverlay

                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                          GoogleMap.Polygon([path=], [geodesic=], [editable=], [stroke_color=], [stroke_opacity=], [stroke_weight=], [stroke_position=], [fill_color=], [fill_opacity=], [clickable=], [draggable=], [visible=], [z_index=])

                                                                                                                                                                                                                                                                                                                                            GoogleMap.Polygon Methods

                                                                                                                                                                                                                                                                                                                                            add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                            Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                              remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                              Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                  GoogleMap.Polygon Properties

                                                                                                                                                                                                                                                                                                                                                  editable - boolean

                                                                                                                                                                                                                                                                                                                                                  True if this overlay can be edited by the user.

                                                                                                                                                                                                                                                                                                                                                  fill_color - string

                                                                                                                                                                                                                                                                                                                                                  The color to draw the overlay outline.

                                                                                                                                                                                                                                                                                                                                                  fill_opacity - number

                                                                                                                                                                                                                                                                                                                                                  The opacity of the overlay outline.

                                                                                                                                                                                                                                                                                                                                                  geodesic - boolean

                                                                                                                                                                                                                                                                                                                                                  When true, edges of the polygon are interpreted as geodesic and will follow the curvature of the Earth.

                                                                                                                                                                                                                                                                                                                                                  parent

                                                                                                                                                                                                                                                                                                                                                  path - list(anvil.GoogleMap.LatLng instance)

                                                                                                                                                                                                                                                                                                                                                  The ordered sequence of LatLng coordinates of the Polygon.

                                                                                                                                                                                                                                                                                                                                                  stroke_color - string

                                                                                                                                                                                                                                                                                                                                                  The color to draw the overlay outline.

                                                                                                                                                                                                                                                                                                                                                  stroke_opacity - number

                                                                                                                                                                                                                                                                                                                                                  The opacity of the overlay outline.

                                                                                                                                                                                                                                                                                                                                                  stroke_position - anvil.GoogleMap.StrokePosition

                                                                                                                                                                                                                                                                                                                                                  The stroke position. Defaults to CENTER.

                                                                                                                                                                                                                                                                                                                                                  stroke_weight - number

                                                                                                                                                                                                                                                                                                                                                  The weight of the overlay outline


                                                                                                                                                                                                                                                                                                                                                  GoogleMap.Polyline (more info)

                                                                                                                                                                                                                                                                                                                                                  Create a new ‘Polyline’ object


                                                                                                                                                                                                                                                                                                                                                  Base class: anvil.GoogleMap.AbstractOverlay

                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                  GoogleMap.Polyline([icons=], [path=], [geodesic=], [editable=], [stroke_color=], [stroke_opacity=], [stroke_weight=], [clickable=], [draggable=], [visible=], [z_index=])

                                                                                                                                                                                                                                                                                                                                                    GoogleMap.Polyline Methods

                                                                                                                                                                                                                                                                                                                                                    add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                    Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                      remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                      Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                        set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                        Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                          GoogleMap.Polyline Properties

                                                                                                                                                                                                                                                                                                                                                          editable - boolean

                                                                                                                                                                                                                                                                                                                                                          True if this overlay can be edited by the user.

                                                                                                                                                                                                                                                                                                                                                          geodesic - boolean

                                                                                                                                                                                                                                                                                                                                                          When true, edges of the polygon are interpreted as geodesic and will follow the curvature of the Earth.

                                                                                                                                                                                                                                                                                                                                                          icons

                                                                                                                                                                                                                                                                                                                                                          The icons to be rendered along the polyline.

                                                                                                                                                                                                                                                                                                                                                          parent

                                                                                                                                                                                                                                                                                                                                                          path - list(anvil.GoogleMap.LatLng instance)

                                                                                                                                                                                                                                                                                                                                                          The ordered sequence of LatLng coordinates of the Polyline.

                                                                                                                                                                                                                                                                                                                                                          stroke_color - string

                                                                                                                                                                                                                                                                                                                                                          The color to draw the overlay outline.

                                                                                                                                                                                                                                                                                                                                                          stroke_opacity - number

                                                                                                                                                                                                                                                                                                                                                          The opacity of the overlay outline.

                                                                                                                                                                                                                                                                                                                                                          stroke_weight - number

                                                                                                                                                                                                                                                                                                                                                          The weight of the overlay outline


                                                                                                                                                                                                                                                                                                                                                          GoogleMap.Rectangle (more info)

                                                                                                                                                                                                                                                                                                                                                          Create a new ‘Rectangle’ object


                                                                                                                                                                                                                                                                                                                                                          Base class: anvil.GoogleMap.AbstractOverlay

                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                          GoogleMap.Rectangle([bounds=], [editable=], [stroke_color=], [stroke_opacity=], [stroke_weight=], [stroke_position=], [fill_color=], [fill_opacity=], [clickable=], [draggable=], [visible=], [z_index=])

                                                                                                                                                                                                                                                                                                                                                            GoogleMap.Rectangle Methods

                                                                                                                                                                                                                                                                                                                                                            add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                            Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                              remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                              Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                                  GoogleMap.Rectangle Properties

                                                                                                                                                                                                                                                                                                                                                                  bounds - anvil.GoogleMap.LatLngBounds instance

                                                                                                                                                                                                                                                                                                                                                                  The bounds of the Rectangle.

                                                                                                                                                                                                                                                                                                                                                                  editable - boolean

                                                                                                                                                                                                                                                                                                                                                                  True if this overlay can be edited by the user.

                                                                                                                                                                                                                                                                                                                                                                  fill_color - string

                                                                                                                                                                                                                                                                                                                                                                  The color to draw the overlay outline.

                                                                                                                                                                                                                                                                                                                                                                  fill_opacity - number

                                                                                                                                                                                                                                                                                                                                                                  The opacity of the overlay outline.

                                                                                                                                                                                                                                                                                                                                                                  parent

                                                                                                                                                                                                                                                                                                                                                                  stroke_color - string

                                                                                                                                                                                                                                                                                                                                                                  The color to draw the overlay outline.

                                                                                                                                                                                                                                                                                                                                                                  stroke_opacity - number

                                                                                                                                                                                                                                                                                                                                                                  The opacity of the overlay outline.

                                                                                                                                                                                                                                                                                                                                                                  stroke_position - anvil.GoogleMap.StrokePosition

                                                                                                                                                                                                                                                                                                                                                                  The stroke position. Defaults to CENTER.

                                                                                                                                                                                                                                                                                                                                                                  stroke_weight - number

                                                                                                                                                                                                                                                                                                                                                                  The weight of the overlay outline


                                                                                                                                                                                                                                                                                                                                                                  GoogleMap.Rectangle Events

                                                                                                                                                                                                                                                                                                                                                                  bounds_changed()

                                                                                                                                                                                                                                                                                                                                                                  When the bounds of this rectangle change, i.e. when it is moved or resized.


                                                                                                                                                                                                                                                                                                                                                                  GoogleMap.RotateControlOptions

                                                                                                                                                                                                                                                                                                                                                                  Construct new RotateControlOptions with the specified options.

                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                  GoogleMap.RotateControlOptions([position=])

                                                                                                                                                                                                                                                                                                                                                                    GoogleMap.RotateControlOptions Attributes

                                                                                                                                                                                                                                                                                                                                                                    position - anvil.GoogleMap.ControlPosition

                                                                                                                                                                                                                                                                                                                                                                    Position of the controls.


                                                                                                                                                                                                                                                                                                                                                                    GoogleMap.ScaleControlOptions

                                                                                                                                                                                                                                                                                                                                                                    Construct new ScaleControlOptions with the specified options.

                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                    GoogleMap.ScaleControlOptions([position=])

                                                                                                                                                                                                                                                                                                                                                                      GoogleMap.ScaleControlOptions Attributes

                                                                                                                                                                                                                                                                                                                                                                      position - anvil.GoogleMap.ControlPosition

                                                                                                                                                                                                                                                                                                                                                                      Position of the controls.


                                                                                                                                                                                                                                                                                                                                                                      GoogleMap.Size

                                                                                                                                                                                                                                                                                                                                                                      Create a new Size at the specified coordinates.

                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                      GoogleMap.Size(x, y)

                                                                                                                                                                                                                                                                                                                                                                        GoogleMap.StreetViewControlOptions

                                                                                                                                                                                                                                                                                                                                                                        Construct new StreetViewControlOptions with the specified options.

                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                        GoogleMap.StreetViewControlOptions([position=])

                                                                                                                                                                                                                                                                                                                                                                          GoogleMap.StreetViewControlOptions Attributes

                                                                                                                                                                                                                                                                                                                                                                          position - anvil.GoogleMap.ControlPosition

                                                                                                                                                                                                                                                                                                                                                                          Position of the controls.


                                                                                                                                                                                                                                                                                                                                                                          GoogleMap.StrokePosition

                                                                                                                                                                                                                                                                                                                                                                          An object containing pre-defined stroke positions for shape outlines.

                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                          GoogleMap.StrokePosition()

                                                                                                                                                                                                                                                                                                                                                                          GoogleMap.Symbol

                                                                                                                                                                                                                                                                                                                                                                          Construct a Symbol with the specified options.

                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                          GoogleMap.Symbol([anchor=], [fill_color=], [fill_opacity=], [label_origin=], [path=], [rotation=], [scale=], [strokeColor=], [strokeOpacity=], [strokeWeight=])

                                                                                                                                                                                                                                                                                                                                                                            GoogleMap.Symbol Attributes

                                                                                                                                                                                                                                                                                                                                                                            anchor - anvil.GoogleMap.Point instance

                                                                                                                                                                                                                                                                                                                                                                            The position of the symbol relative to the marker or polyline.

                                                                                                                                                                                                                                                                                                                                                                            fill_color - string

                                                                                                                                                                                                                                                                                                                                                                            The fill color of this symbol.

                                                                                                                                                                                                                                                                                                                                                                            fill_opacity - number

                                                                                                                                                                                                                                                                                                                                                                            The fill opacity of this symbol. Defaults to 0.

                                                                                                                                                                                                                                                                                                                                                                            label_origin - anvil.GoogleMap.Point instance

                                                                                                                                                                                                                                                                                                                                                                            The origin of the label relative to the origin of the path, if label is supplied by the marker.

                                                                                                                                                                                                                                                                                                                                                                            path - anvil.GoogleMap.SymbolPath

                                                                                                                                                                                                                                                                                                                                                                            The symbol’s path, which is a built-in symbol path, or a custom path expressed using SVG path notation.

                                                                                                                                                                                                                                                                                                                                                                            rotation - number

                                                                                                                                                                                                                                                                                                                                                                            The angle by which to rotate the symbol, expressed clockwise in degrees.

                                                                                                                                                                                                                                                                                                                                                                            scale - number

                                                                                                                                                                                                                                                                                                                                                                            The amount by which the symbol is scaled in size.

                                                                                                                                                                                                                                                                                                                                                                            strokecolor - string

                                                                                                                                                                                                                                                                                                                                                                            The symbol’s stroke color.

                                                                                                                                                                                                                                                                                                                                                                            strokeopacity - number

                                                                                                                                                                                                                                                                                                                                                                            The symbol’s stroke opacity.

                                                                                                                                                                                                                                                                                                                                                                            strokeweight - number

                                                                                                                                                                                                                                                                                                                                                                            The symbol’s stroke weight.


                                                                                                                                                                                                                                                                                                                                                                            GoogleMap.SymbolPath

                                                                                                                                                                                                                                                                                                                                                                            An object containing pre-defined symbol paths for use on maps.

                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                            GoogleMap.SymbolPath()

                                                                                                                                                                                                                                                                                                                                                                            GoogleMap.ZoomControlOptions

                                                                                                                                                                                                                                                                                                                                                                            Construct new ZoomControlOptions with the specified options.

                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                            GoogleMap.ZoomControlOptions([position=])

                                                                                                                                                                                                                                                                                                                                                                              GoogleMap.ZoomControlOptions Attributes

                                                                                                                                                                                                                                                                                                                                                                              position - anvil.GoogleMap.ControlPosition

                                                                                                                                                                                                                                                                                                                                                                              Position of the controls.


                                                                                                                                                                                                                                                                                                                                                                              GridPanel (more info)

                                                                                                                                                                                                                                                                                                                                                                              Create a new ‘GridPanel’ object


                                                                                                                                                                                                                                                                                                                                                                              Base class: anvil.Container

                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                              GridPanel([spacing_above=], [spacing_below=], [spacing=], [background=], [foreground=], [border=], [visible=], [role=], [tag=], [tooltip=])

                                                                                                                                                                                                                                                                                                                                                                                GridPanel Methods

                                                                                                                                                                                                                                                                                                                                                                                add_component(component, [row=], [col_xs=], [width_xs=])

                                                                                                                                                                                                                                                                                                                                                                                Add a component to this GridPanel

                                                                                                                                                                                                                                                                                                                                                                                  add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                  Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                                                    remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                                                    Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                                      set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                      Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                                                        GridPanel Properties

                                                                                                                                                                                                                                                                                                                                                                                        background - color

                                                                                                                                                                                                                                                                                                                                                                                        The background colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                        border - string

                                                                                                                                                                                                                                                                                                                                                                                        The border of this component. Can take any valid CSS border value.

                                                                                                                                                                                                                                                                                                                                                                                        foreground - color

                                                                                                                                                                                                                                                                                                                                                                                        The foreground colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                        parent

                                                                                                                                                                                                                                                                                                                                                                                        role - themeRole

                                                                                                                                                                                                                                                                                                                                                                                        Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                                                                                                                                                                                                                                                                        spacing - spacing

                                                                                                                                                                                                                                                                                                                                                                                        Margin and padding for this container. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                                                                                                                                                                                                                                                        spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                        The vertical space above this component.

                                                                                                                                                                                                                                                                                                                                                                                        spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                        The vertical space below this component.

                                                                                                                                                                                                                                                                                                                                                                                        tag - object

                                                                                                                                                                                                                                                                                                                                                                                        Use this property to store any extra information about this component

                                                                                                                                                                                                                                                                                                                                                                                        tooltip - string

                                                                                                                                                                                                                                                                                                                                                                                        Text to display when you hover the mouse over this component

                                                                                                                                                                                                                                                                                                                                                                                        visible - boolean

                                                                                                                                                                                                                                                                                                                                                                                        Should this component be displayed?


                                                                                                                                                                                                                                                                                                                                                                                        GridPanel Events

                                                                                                                                                                                                                                                                                                                                                                                        show()

                                                                                                                                                                                                                                                                                                                                                                                        When the GridPanel is shown on the screen

                                                                                                                                                                                                                                                                                                                                                                                        hide()

                                                                                                                                                                                                                                                                                                                                                                                        When the GridPanel is removed from the screen


                                                                                                                                                                                                                                                                                                                                                                                        HtmlComponent (more info)

                                                                                                                                                                                                                                                                                                                                                                                        Create a new ‘HtmlComponent’ object


                                                                                                                                                                                                                                                                                                                                                                                        Base class: anvil.Container

                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                        HtmlComponent([visible=], [tag=], [html=], [classes=], [style=], [attrs=])

                                                                                                                                                                                                                                                                                                                                                                                          HtmlComponent Methods

                                                                                                                                                                                                                                                                                                                                                                                          add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                          Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                                                            remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                                                            Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                                              set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                              Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                                                                HtmlComponent Properties

                                                                                                                                                                                                                                                                                                                                                                                                attrs - anvil.Attrs instance

                                                                                                                                                                                                                                                                                                                                                                                                The HTML attributes applied to this HtmlComponent’s root element.

                                                                                                                                                                                                                                                                                                                                                                                                classes - anvil.Classes instance

                                                                                                                                                                                                                                                                                                                                                                                                The class names applied to this HtmlComponent’s root element.

                                                                                                                                                                                                                                                                                                                                                                                                html - html

                                                                                                                                                                                                                                                                                                                                                                                                The HTML from which this component is defined.

                                                                                                                                                                                                                                                                                                                                                                                                parent

                                                                                                                                                                                                                                                                                                                                                                                                style - anvil.Style instance

                                                                                                                                                                                                                                                                                                                                                                                                The inline styles applied to this HtmlComponent’s root element.

                                                                                                                                                                                                                                                                                                                                                                                                tag - object

                                                                                                                                                                                                                                                                                                                                                                                                Use this property to store any extra information about this component

                                                                                                                                                                                                                                                                                                                                                                                                visible - boolean

                                                                                                                                                                                                                                                                                                                                                                                                Should this component be displayed?


                                                                                                                                                                                                                                                                                                                                                                                                HtmlTemplate (more info)

                                                                                                                                                                                                                                                                                                                                                                                                Create a new ‘HtmlTemplate’ object


                                                                                                                                                                                                                                                                                                                                                                                                Base class: anvil.Container

                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                HtmlTemplate([html=], [tag=], [tooltip=], [background=], [foreground=], [border=], [visible=], [role=])

                                                                                                                                                                                                                                                                                                                                                                                                  HtmlTemplate Methods

                                                                                                                                                                                                                                                                                                                                                                                                  add_component(component, [slot="default"])

                                                                                                                                                                                                                                                                                                                                                                                                  Add a component to the named slot of this HTML templated panel. If no slot is specified, the ‘default’ slot will be used.

                                                                                                                                                                                                                                                                                                                                                                                                    add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                    Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                                                                      call_js(js_function_name, *args)

                                                                                                                                                                                                                                                                                                                                                                                                      Call a Javascript function

                                                                                                                                                                                                                                                                                                                                                                                                        clear([slot="default"])

                                                                                                                                                                                                                                                                                                                                                                                                        clear the HTML template of all components or clear a specific slot of components.

                                                                                                                                                                                                                                                                                                                                                                                                          remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                                                                          Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                                                            set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                            Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                                                                              HtmlTemplate Properties

                                                                                                                                                                                                                                                                                                                                                                                                              background - color

                                                                                                                                                                                                                                                                                                                                                                                                              The background colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                              border - string

                                                                                                                                                                                                                                                                                                                                                                                                              The border of this component. Can take any valid CSS border value.

                                                                                                                                                                                                                                                                                                                                                                                                              dom_nodes - dict

                                                                                                                                                                                                                                                                                                                                                                                                              A read-only dictionary allowing you to look up the DOM node by name for any HTML tag in this component’s HTML that has an anvil-name= attribute.

                                                                                                                                                                                                                                                                                                                                                                                                              foreground - color

                                                                                                                                                                                                                                                                                                                                                                                                              The foreground colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                              html - html

                                                                                                                                                                                                                                                                                                                                                                                                              The HTML from which this panel is defined

                                                                                                                                                                                                                                                                                                                                                                                                              parent

                                                                                                                                                                                                                                                                                                                                                                                                              role - themeRole

                                                                                                                                                                                                                                                                                                                                                                                                              Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                                                                                                                                                                                                                                                                                              tag - object

                                                                                                                                                                                                                                                                                                                                                                                                              Use this property to store any extra information about this component

                                                                                                                                                                                                                                                                                                                                                                                                              tooltip - string

                                                                                                                                                                                                                                                                                                                                                                                                              Text to display when you hover the mouse over this component

                                                                                                                                                                                                                                                                                                                                                                                                              visible - boolean

                                                                                                                                                                                                                                                                                                                                                                                                              Should this component be displayed?


                                                                                                                                                                                                                                                                                                                                                                                                              HtmlTemplate Events

                                                                                                                                                                                                                                                                                                                                                                                                              show()

                                                                                                                                                                                                                                                                                                                                                                                                              When the HtmlTemplate is shown on the screen

                                                                                                                                                                                                                                                                                                                                                                                                              hide()

                                                                                                                                                                                                                                                                                                                                                                                                              When the HtmlTemplate is removed from the screen


                                                                                                                                                                                                                                                                                                                                                                                                              Image (more info)

                                                                                                                                                                                                                                                                                                                                                                                                              Create a new ‘Image’ object


                                                                                                                                                                                                                                                                                                                                                                                                              Base class: anvil.Component

                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                              Image([alt_text=], [display_mode=], [border_radius=], [horizontal_align=], [vertical_align=], [source=], [spacing_above=], [spacing_below=], [margin=], [height=], [background=], [foreground=], [border=], [visible=], [role=], [tooltip=], [tag=])

                                                                                                                                                                                                                                                                                                                                                                                                                Image Methods

                                                                                                                                                                                                                                                                                                                                                                                                                add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                                                                                  remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                                                                                  Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                                                                    set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                    Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                                                                                      Image Properties

                                                                                                                                                                                                                                                                                                                                                                                                                      alt_text - string

                                                                                                                                                                                                                                                                                                                                                                                                                      Textual replacement for the image used by screen readers and displayed on the page if the image can’t be loaded

                                                                                                                                                                                                                                                                                                                                                                                                                      background - color

                                                                                                                                                                                                                                                                                                                                                                                                                      The background colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                      border - string

                                                                                                                                                                                                                                                                                                                                                                                                                      The border of this component. Can take any valid CSS border value.

                                                                                                                                                                                                                                                                                                                                                                                                                      border_radius - string

                                                                                                                                                                                                                                                                                                                                                                                                                      The border radius of this component

                                                                                                                                                                                                                                                                                                                                                                                                                      display_mode - enum: "shrink_to_fit", "zoom_to_fill", "fill_width", "original_size"

                                                                                                                                                                                                                                                                                                                                                                                                                      Determines how the image’s size should be adjusted to fit the size of this Image component.

                                                                                                                                                                                                                                                                                                                                                                                                                      • shrink_to_fit scales the image to fit while maintaining its aspect ratio.
                                                                                                                                                                                                                                                                                                                                                                                                                      • zoom_to_fill scales the image to fill the entire container while maintaining its aspect ratio. If the image is too large, it will be cropped to fit.
                                                                                                                                                                                                                                                                                                                                                                                                                      • fill_width shrinks or grows the image so the width fits the container.
                                                                                                                                                                                                                                                                                                                                                                                                                      • original_size - displays the image at whatever the browser thinks the original size is. If that would cause the image to be wider than the Image component, it shrinks the image to ensure it fits within the width of the Image component.

                                                                                                                                                                                                                                                                                                                                                                                                                      foreground - color

                                                                                                                                                                                                                                                                                                                                                                                                                      The foreground colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                      height - string

                                                                                                                                                                                                                                                                                                                                                                                                                      The height of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                      horizontal_align - enum: "left", "center", "right"

                                                                                                                                                                                                                                                                                                                                                                                                                      Position the image horizontally within this component

                                                                                                                                                                                                                                                                                                                                                                                                                      margin - margin

                                                                                                                                                                                                                                                                                                                                                                                                                      Margin for this component. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                                                                                                                                                                                                                                                                                      parent

                                                                                                                                                                                                                                                                                                                                                                                                                      role - themeRole

                                                                                                                                                                                                                                                                                                                                                                                                                      Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                                                                                                                                                                                                                                                                                                      source - uri

                                                                                                                                                                                                                                                                                                                                                                                                                      The image source - set a string for a URL or a Media object in code

                                                                                                                                                                                                                                                                                                                                                                                                                      spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                      The vertical space above this component.

                                                                                                                                                                                                                                                                                                                                                                                                                      spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                      The vertical space below this component.

                                                                                                                                                                                                                                                                                                                                                                                                                      tag - object

                                                                                                                                                                                                                                                                                                                                                                                                                      Use this property to store any extra information about this component

                                                                                                                                                                                                                                                                                                                                                                                                                      tooltip - string

                                                                                                                                                                                                                                                                                                                                                                                                                      Text to display when you hover the mouse over this component

                                                                                                                                                                                                                                                                                                                                                                                                                      vertical_align - enum: "top", "center", "bottom"

                                                                                                                                                                                                                                                                                                                                                                                                                      Position the image vertically within this component

                                                                                                                                                                                                                                                                                                                                                                                                                      visible - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                      Should this component be displayed?


                                                                                                                                                                                                                                                                                                                                                                                                                      Image Events

                                                                                                                                                                                                                                                                                                                                                                                                                      show()

                                                                                                                                                                                                                                                                                                                                                                                                                      When the Image is shown on the screen

                                                                                                                                                                                                                                                                                                                                                                                                                      hide()

                                                                                                                                                                                                                                                                                                                                                                                                                      When the Image is removed from the screen

                                                                                                                                                                                                                                                                                                                                                                                                                      mouse_enter(x, y)

                                                                                                                                                                                                                                                                                                                                                                                                                      When the mouse cursor enters this component

                                                                                                                                                                                                                                                                                                                                                                                                                      • x - The x coordinate of the mouse pointer, within this component
                                                                                                                                                                                                                                                                                                                                                                                                                      • y - The y coordinate of the mouse pointer, within this component

                                                                                                                                                                                                                                                                                                                                                                                                                      mouse_leave(x, y)

                                                                                                                                                                                                                                                                                                                                                                                                                      When the mouse cursor leaves this component

                                                                                                                                                                                                                                                                                                                                                                                                                      • x - The x coordinate of the mouse pointer relative to this component
                                                                                                                                                                                                                                                                                                                                                                                                                      • y - The y coordinate of the mouse pointer relative to this component

                                                                                                                                                                                                                                                                                                                                                                                                                      mouse_move(x, y)

                                                                                                                                                                                                                                                                                                                                                                                                                      When the mouse cursor moves over this component

                                                                                                                                                                                                                                                                                                                                                                                                                      • x - The x coordinate of the mouse pointer within this component
                                                                                                                                                                                                                                                                                                                                                                                                                      • y - The y coordinate of the mouse pointer within this component

                                                                                                                                                                                                                                                                                                                                                                                                                      mouse_down(x, y, button, keys)

                                                                                                                                                                                                                                                                                                                                                                                                                      When a mouse button is pressed on this component

                                                                                                                                                                                                                                                                                                                                                                                                                      • x - The x coordinate of the mouse pointer within this component
                                                                                                                                                                                                                                                                                                                                                                                                                      • y - The y coordinate of the mouse pointer within this component
                                                                                                                                                                                                                                                                                                                                                                                                                      • button - The button that was pressed (1 = left, 2 = middle, 3 = right)
                                                                                                                                                                                                                                                                                                                                                                                                                      • keys - A dictionary of keys including 'shift', 'alt', 'ctrl', 'meta'. Each key's value is a boolean indicating if it was pressed during the click event. The meta key on a mac is the Command key

                                                                                                                                                                                                                                                                                                                                                                                                                      mouse_up(x, y, button, keys)

                                                                                                                                                                                                                                                                                                                                                                                                                      When a mouse button is released on this component

                                                                                                                                                                                                                                                                                                                                                                                                                      • x - The x coordinate of the mouse pointer within this component
                                                                                                                                                                                                                                                                                                                                                                                                                      • y - The y coordinate of the mouse pointer within this component
                                                                                                                                                                                                                                                                                                                                                                                                                      • button - The button that was released (1 = left, 2 = middle, 3 = right)
                                                                                                                                                                                                                                                                                                                                                                                                                      • keys - A dictionary of keys including 'shift', 'alt', 'ctrl', 'meta'. Each key's value is a boolean indicating if it was pressed during the click event. The meta key on a mac is the Command key


                                                                                                                                                                                                                                                                                                                                                                                                                      Label (more info)

                                                                                                                                                                                                                                                                                                                                                                                                                      Create a new ‘Label’ object


                                                                                                                                                                                                                                                                                                                                                                                                                      Base class: anvil.Component

                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                      Label([spacing_above=], [spacing_below=], [spacing=], [text=], [align=], [font_size=], [font=], [bold=], [italic=], [underline=], [background=], [foreground=], [border=], [visible=], [role=], [icon=], [icon_align=], [tooltip=], [tag=])

                                                                                                                                                                                                                                                                                                                                                                                                                        Label Methods

                                                                                                                                                                                                                                                                                                                                                                                                                        add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                        Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                                                                                          remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                                                                                          Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                                                                            set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                            Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                                                                                              Label Properties

                                                                                                                                                                                                                                                                                                                                                                                                                              align - enum: "left", "center", "right"

                                                                                                                                                                                                                                                                                                                                                                                                                              Align this component’s text

                                                                                                                                                                                                                                                                                                                                                                                                                              background - color

                                                                                                                                                                                                                                                                                                                                                                                                                              The background colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                              bold - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                              Display this component’s text in bold

                                                                                                                                                                                                                                                                                                                                                                                                                              border - string

                                                                                                                                                                                                                                                                                                                                                                                                                              The border of this component. Can take any valid CSS border value.

                                                                                                                                                                                                                                                                                                                                                                                                                              font - string

                                                                                                                                                                                                                                                                                                                                                                                                                              The font to use for this component.

                                                                                                                                                                                                                                                                                                                                                                                                                              font_size - number

                                                                                                                                                                                                                                                                                                                                                                                                                              The height of text displayed on this component in pixels

                                                                                                                                                                                                                                                                                                                                                                                                                              foreground - color

                                                                                                                                                                                                                                                                                                                                                                                                                              The foreground colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                              icon - icon

                                                                                                                                                                                                                                                                                                                                                                                                                              The icon to display on this component. Either a URL, or a FontAwesome Icon, e.g. ‘fa:user’.

                                                                                                                                                                                                                                                                                                                                                                                                                              icon_align - enum: "left_edge", "left", "top", "right", "right_edge"

                                                                                                                                                                                                                                                                                                                                                                                                                              The alignment of the icon on this component. Set to ’top’ for a centred icon on a component with no text.

                                                                                                                                                                                                                                                                                                                                                                                                                              italic - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                              Display this component’s text in italics

                                                                                                                                                                                                                                                                                                                                                                                                                              parent

                                                                                                                                                                                                                                                                                                                                                                                                                              role - themeRole

                                                                                                                                                                                                                                                                                                                                                                                                                              Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                                                                                                                                                                                                                                                                                                              spacing - spacing

                                                                                                                                                                                                                                                                                                                                                                                                                              Margin and padding for this container. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                                                                                                                                                                                                                                                                                              spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                              The vertical space above this component.

                                                                                                                                                                                                                                                                                                                                                                                                                              spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                              The vertical space below this component.

                                                                                                                                                                                                                                                                                                                                                                                                                              tag - object

                                                                                                                                                                                                                                                                                                                                                                                                                              Use this property to store any extra information about this component

                                                                                                                                                                                                                                                                                                                                                                                                                              text - string

                                                                                                                                                                                                                                                                                                                                                                                                                              The text displayed on this component

                                                                                                                                                                                                                                                                                                                                                                                                                              tooltip - string

                                                                                                                                                                                                                                                                                                                                                                                                                              Text to display when you hover the mouse over this component

                                                                                                                                                                                                                                                                                                                                                                                                                              underline - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                              Display this component’s text underlined

                                                                                                                                                                                                                                                                                                                                                                                                                              visible - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                              Should this component be displayed?


                                                                                                                                                                                                                                                                                                                                                                                                                              Label Events

                                                                                                                                                                                                                                                                                                                                                                                                                              show()

                                                                                                                                                                                                                                                                                                                                                                                                                              When the Label is shown on the screen

                                                                                                                                                                                                                                                                                                                                                                                                                              hide()

                                                                                                                                                                                                                                                                                                                                                                                                                              When the Label is removed from the screen


                                                                                                                                                                                                                                                                                                                                                                                                                              LinearPanel (more info)

                                                                                                                                                                                                                                                                                                                                                                                                                              Create a new ‘LinearPanel’ object


                                                                                                                                                                                                                                                                                                                                                                                                                              Base class: anvil.Container

                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                              LinearPanel([spacing_above=], [spacing_below=], [spacing=], [background=], [foreground=], [border=], [visible=], [role=], [tooltip=], [tag=])

                                                                                                                                                                                                                                                                                                                                                                                                                                LinearPanel Methods

                                                                                                                                                                                                                                                                                                                                                                                                                                add_component(component, [index=None])

                                                                                                                                                                                                                                                                                                                                                                                                                                Add a component to this LinearPanel, in the ‘index’th position. If ‘index’ is not specified, adds to the bottom.

                                                                                                                                                                                                                                                                                                                                                                                                                                  add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                  Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                                                                                                    remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                                                                                                    Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                                                                                      set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                      Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                                                                                                        LinearPanel Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                        background - color

                                                                                                                                                                                                                                                                                                                                                                                                                                        The background colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                        border - string

                                                                                                                                                                                                                                                                                                                                                                                                                                        The border of this component. Can take any valid CSS border value.

                                                                                                                                                                                                                                                                                                                                                                                                                                        foreground - color

                                                                                                                                                                                                                                                                                                                                                                                                                                        The foreground colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                        parent

                                                                                                                                                                                                                                                                                                                                                                                                                                        role - themeRole

                                                                                                                                                                                                                                                                                                                                                                                                                                        Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                                                                                                                                                                                                                                                                                                                        spacing - spacing

                                                                                                                                                                                                                                                                                                                                                                                                                                        Margin and padding for this container. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                                                                                                                                                                                                                                                                                                        spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                        The vertical space above this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                        spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                        The vertical space below this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                        tag - object

                                                                                                                                                                                                                                                                                                                                                                                                                                        Use this property to store any extra information about this component

                                                                                                                                                                                                                                                                                                                                                                                                                                        tooltip - string

                                                                                                                                                                                                                                                                                                                                                                                                                                        Text to display when you hover the mouse over this component

                                                                                                                                                                                                                                                                                                                                                                                                                                        visible - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                        Should this component be displayed?


                                                                                                                                                                                                                                                                                                                                                                                                                                        LinearPanel Events

                                                                                                                                                                                                                                                                                                                                                                                                                                        show()

                                                                                                                                                                                                                                                                                                                                                                                                                                        When the LinearPanel is shown on the screen

                                                                                                                                                                                                                                                                                                                                                                                                                                        hide()

                                                                                                                                                                                                                                                                                                                                                                                                                                        When the LinearPanel is removed from the screen


                                                                                                                                                                                                                                                                                                                                                                                                                                        Create a new ‘Link’ object


                                                                                                                                                                                                                                                                                                                                                                                                                                        Base class: anvil.ColumnPanel
                                                                                                                                                                                                                                                                                                                                                                                                                                        Link([url=], [text_padding=], [text=], [align=], [font_size=], [font=], [bold=], [italic=], [underline=], [icon=], [icon_align=], [tooltip=], [tag=])

                                                                                                                                                                                                                                                                                                                                                                                                                                          add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                          Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                                                                                                            remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                                                                                                            Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                                                                                              set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                              Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                                                                                                                align - enum: "left", "center", "right"

                                                                                                                                                                                                                                                                                                                                                                                                                                                Align this component’s text

                                                                                                                                                                                                                                                                                                                                                                                                                                                bold - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                Display this component’s text in bold

                                                                                                                                                                                                                                                                                                                                                                                                                                                font - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                The font to use for this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                font_size - number

                                                                                                                                                                                                                                                                                                                                                                                                                                                The height of text displayed on this component in pixels

                                                                                                                                                                                                                                                                                                                                                                                                                                                icon - icon

                                                                                                                                                                                                                                                                                                                                                                                                                                                The icon to display on this component. Either a URL, or a FontAwesome Icon, e.g. ‘fa:user’.

                                                                                                                                                                                                                                                                                                                                                                                                                                                icon_align - enum: "left_edge", "left", "top", "right", "right_edge"

                                                                                                                                                                                                                                                                                                                                                                                                                                                The alignment of the icon on this component. Set to ’top’ for a centred icon on a component with no text.

                                                                                                                                                                                                                                                                                                                                                                                                                                                italic - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                Display this component’s text in italics

                                                                                                                                                                                                                                                                                                                                                                                                                                                parent

                                                                                                                                                                                                                                                                                                                                                                                                                                                tag - object

                                                                                                                                                                                                                                                                                                                                                                                                                                                Use this property to store any extra information about this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                text - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                The text displayed on this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                text_padding - padding

                                                                                                                                                                                                                                                                                                                                                                                                                                                Padding for the link text. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                tooltip - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                Text to display when you hover the mouse over this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                underline - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                Display this component’s text underlined

                                                                                                                                                                                                                                                                                                                                                                                                                                                url - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                The target URL of the link. Can be set to a URL string or to a Media object.


                                                                                                                                                                                                                                                                                                                                                                                                                                                click(keys)

                                                                                                                                                                                                                                                                                                                                                                                                                                                When the link is clicked

                                                                                                                                                                                                                                                                                                                                                                                                                                                • keys - A dictionary of keys including 'shift', 'alt', 'ctrl', 'meta'. Each key's value is a boolean indicating if it was pressed during the click event. The meta key on a mac is the Command key


                                                                                                                                                                                                                                                                                                                                                                                                                                                Media

                                                                                                                                                                                                                                                                                                                                                                                                                                                Create a new ‘Media’ object

                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                Media()

                                                                                                                                                                                                                                                                                                                                                                                                                                                Instance Methods

                                                                                                                                                                                                                                                                                                                                                                                                                                                get_bytes()

                                                                                                                                                                                                                                                                                                                                                                                                                                                Get a binary string of the data represented by this Media object

                                                                                                                                                                                                                                                                                                                                                                                                                                                get_url()

                                                                                                                                                                                                                                                                                                                                                                                                                                                Get a Media object’s URL, or None if there isn’t one associated with it.


                                                                                                                                                                                                                                                                                                                                                                                                                                                Media Attributes

                                                                                                                                                                                                                                                                                                                                                                                                                                                content_type - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                The MIME type of this Media

                                                                                                                                                                                                                                                                                                                                                                                                                                                length - number

                                                                                                                                                                                                                                                                                                                                                                                                                                                The length of this Media, in bytes

                                                                                                                                                                                                                                                                                                                                                                                                                                                name - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                The file name associated with this Media, or None if it has no name

                                                                                                                                                                                                                                                                                                                                                                                                                                                url - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                The URL where you can download this Media, or None if it is not downloadable


                                                                                                                                                                                                                                                                                                                                                                                                                                                Notification

                                                                                                                                                                                                                                                                                                                                                                                                                                                Create a popup notification. Call the show() method to display it.

                                                                                                                                                                                                                                                                                                                                                                                                                                                Set timeout to None or 0 to keep it visible until dismissed. Set role to a theme role name or list of names. The style argument is deprecated; use role and theme CSS instead. Can also be used as a context manager.

                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                Notification(message, [title=""], [timeout=2], [role=None])

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Instance Methods

                                                                                                                                                                                                                                                                                                                                                                                                                                                  __enter__() → anvil.Notification instance

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Show the notification when entering a ‘with’ block

                                                                                                                                                                                                                                                                                                                                                                                                                                                  __exit__() → anvil.Notification instance

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Hide the notification when exiting a ‘with’ block

                                                                                                                                                                                                                                                                                                                                                                                                                                                  hide()

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Hides the notification immediately

                                                                                                                                                                                                                                                                                                                                                                                                                                                  show() → anvil.Notification instance

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shows the notification


                                                                                                                                                                                                                                                                                                                                                                                                                                                  Plot (more info)

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Create a new ‘Plot’ object


                                                                                                                                                                                                                                                                                                                                                                                                                                                  Base class: anvil.Component

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Plot([data=], [layout=], [config=], [figure=], [interactive=], [spacing_above=], [spacing_below=], [margin=], [height=], [visible=], [tooltip=], [tag=])

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Plot Methods

                                                                                                                                                                                                                                                                                                                                                                                                                                                    add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                                                                                                                      extend_traces(data, traces)

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Adds data to an existing trace.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        prepend_traces(data, traces)

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Prepends data to an existing trace.

                                                                                                                                                                                                                                                                                                                                                                                                                                                          redraw()

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Redraws the chart. Call this function if you have updated data or layout properties.

                                                                                                                                                                                                                                                                                                                                                                                                                                                          relayout(update)

                                                                                                                                                                                                                                                                                                                                                                                                                                                          A more efficient means of updating just the layout in a graphDiv. The call signature and arguments for relayout are similar (but simpler) to restyle.

                                                                                                                                                                                                                                                                                                                                                                                                                                                            remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                                                                                                              restyle(update, traces)

                                                                                                                                                                                                                                                                                                                                                                                                                                                              A more efficient means of changing attributes in the data array. When restyling, you may choose to have the specified changes effect as many traces as desired.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  to_image(options) → anvil.URLMedia instance

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Returns a Media object containing a snapshot of this plot. The argument is a dictionary specifying image options.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Plot Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    config - dict

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Plot config

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    data - object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Plot traces

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    figure - dict

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The Plotly figure to display. Specifies layout and data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    height - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The height of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    interactive - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Whether this plot should be interactive

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    layout - plotly.graph_objs.Layout instance

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Plot layout

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    margin - margin

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Margin for this component. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    parent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The vertical space above this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The vertical space below this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    tag - object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Use this property to store any extra information about this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    templates - mapping

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    plotly templates, see plotly docs for valid template names. Set the default template using Plot.templates.default = ‘seaborn’.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    tooltip - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Text to display when you hover the mouse over this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    visible - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Should this component be displayed?


                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Plot Events

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    click(points)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    when a data point is clicked.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • points - A list of the data points that were clicked.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    double_click()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    when the plot is double-clicked.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    afterplot()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    after then plot is redrawn.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    select(points)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    when a data point is selected.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • points - A list of the data points that were selected.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    hover(points)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    when a data point is hovered.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • points - A list of the data points that were hovered.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    unhover(points)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    when a data point is unhovered.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • points - A list of the data points that were unhovered.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    show()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    When the Plot is shown on the screen

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    hide()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    When the Plot is removed from the screen


                                                                                                                                                                                                                                                                                                                                                                                                                                                                    RadioButton (more info)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Create a new ‘RadioButton’ object


                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Base class: anvil.Component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    RadioButton([selected=], [value=], [group_name=], [text=], [align=], [font_size=], [font=], [bold=], [italic=], [underline=], [spacing_above=], [spacing_below=], [spacing=], [enabled=], [background=], [foreground=], [border=], [visible=], [role=], [tooltip=], [tag=])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RadioButton Methods

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        get_group_value() → str

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        returns the value of the button in the group which is pressed.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RadioButton Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            align - enum: "left", "center", "right"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Align this component’s text

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            background - color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The background colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            bold - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Display this component’s text in bold

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            border - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The border of this component. Can take any valid CSS border value.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            enabled - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            True if this component should allow user interaction.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            font - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The font to use for this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            font_size - number

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The height of text displayed on this component in pixels

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            foreground - color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The foreground colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            group_name - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The name of the group this radio button belongs to.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            italic - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Display this component’s text in italics

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            parent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            role - themeRole

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            selected - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The status of the radio button

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            spacing - spacing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Margin and padding for this container. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The vertical space above this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The vertical space below this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            tag - object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Use this property to store any extra information about this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            text - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The text displayed on this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            tooltip - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Text to display when you hover the mouse over this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            underline - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Display this component’s text underlined

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            value - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The value of the group when this radio button is selected

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            visible - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Should this component be displayed?


                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RadioButton Events

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            clicked()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            When this radio button is selected

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            show()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            When the RadioButton is shown on the screen

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            hide()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            When the RadioButton is removed from the screen


                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RepeatingPanel (more info)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Create a new ‘RepeatingPanel’ object


                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Base class: anvil.Component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RepeatingPanel([item_template=], [items=], [background=], [foreground=], [border=], [visible=], [role=], [spacing_above=], [spacing_below=], [margin=], [tooltip=], [tag=])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              RepeatingPanel Methods

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                get_components()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Get the list of components created by this Repeating Panel. Each will be an instance of ‘item_template’, one for each item in ‘items’.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                raise_event_on_children(event_name, **event_args)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Trigger the ’event_name’ event on all children of this component. Any keyword arguments are passed to the handler function.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RepeatingPanel Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      background - color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The background colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      border - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The border of this component. Can take any valid CSS border value.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      foreground - color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The foreground colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      item_template - form

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The name of the form to repeat for every item

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      items - object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      A list of items for which the ‘item_template’ will be instantiated.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      margin - margin

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Margin for this component. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      parent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      role - themeRole

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The vertical space above this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The vertical space below this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      tag - object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Use this property to store any extra information about this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      tooltip - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Text to display when you hover the mouse over this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      visible - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Should this component be displayed?


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RepeatingPanel Events

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      show()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      When the RepeatingPanel is shown on the screen

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      hide()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      When the RepeatingPanel is removed from the screen


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RichText (more info)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Create a new ‘RichText’ object


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Base class: anvil.Container

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RichText([content=], [format=], [enable_slots=], [data=], [align=], [font_size=], [font=], [spacing_above=], [spacing_below=], [spacing=], [background=], [foreground=], [border=], [visible=], [role=], [tooltip=], [tag=])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        RichText Methods

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        add_component(component, slot)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Add a component to this panel, in the specified slot

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            clear([slot="slot_name"])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            clear the Rich Text Component of all components or clear a specific slot of components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RichText Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  align - enum: "left", "center", "right"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Align this component’s text

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  background - color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The background colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  border - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The border of this component. Can take any valid CSS border value.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  content - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The content to render in this component, in the format specified by the ‘format’ property

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  data - object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  A dict of data or Components to populate the named content {slots}. Can also be a dict-like object.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  enable_slots - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If true {braces} in content define slots. If false, braces in content display normally.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  font - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The font to use for this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  font_size - number

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The height of text displayed on this component in pixels

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  foreground - color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The foreground colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  format - enum: "markdown", "plain_text", "restricted_html"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The format of the content of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  parent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  role - themeRole

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  spacing - spacing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Margin and padding for this container. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The vertical space above this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The vertical space below this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  tag - object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Use this property to store any extra information about this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  tooltip - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Text to display when you hover the mouse over this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  visible - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Should this component be displayed?


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RichText Events

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  show()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  When the RichText is shown on the screen

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  hide()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  When the RichText is removed from the screen


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Slot

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  A Slot class represents a way to add components to an underlying container. You will rarely instantiate a Slot on its own; instead your form’s layout will contain Slots to which you can add components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Slot(target_container, insertion_index, [layout_properties])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • target_container - The target container into which components added to this slot will be added.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • insertion_index - The starting index (within the target container) at which components added to this slot will be inserted.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • layout_properties - A dictionary of layout properties that will be passed as keyword arguments to the target container's add_component() call, overriding any values provided to the slot's add_component().


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Instance Methods

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  add_component(component, [index=None], **layout_properties)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Add a component to this slot.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Calling add_component() on a Slot will add the specified component to its target container.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • component - The component to add to this slot.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • index - The index, within the slot, at which the component is to be inserted. Note: This argument is index is within the Slot, not within the target container. The Slot will adjust for its own insertion_index, as well as components in any previous slots registered with offset_by_slot(), when computing the index= parameter to the target container's add_component() method.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • layout_properties - Layout properties will be passed on as keyword arguments to the target container's add_component() method, unless overridden by the Slot.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  offset_by_slot(offset_by_slot)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inform this Slot of an earlier Slot with the same target container. Future calls to add_component() will take account of any components inserted into the earlier slot when calculating the insertion index for the target container, thereby preserving ordering between the two slots’ components.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Spacer (more info)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Create a new ‘Spacer’ object


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Base class: anvil.Component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Spacer([visible=], [spacing_above=], [spacing_below=], [height=], [tooltip=], [tag=])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Spacer Methods

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Spacer Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            height - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The height of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            parent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The vertical space above this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The vertical space below this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            tag - object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Use this property to store any extra information about this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            tooltip - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Text to display when you hover the mouse over this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            visible - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Should this component be displayed?


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Spacer Events

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            show()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            When the Spacer is shown on the screen

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            hide()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            When the Spacer is removed from the screen


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Style

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Create a live style helper. value may be None, a CSS string, a dictionary of CSS property names to values, or another Style object.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Style([value=None])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Instance Methods

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              clear()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Remove all CSS properties.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                get(property, [default=""])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Return a CSS property value, or default when it is not set.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  items() → iterator

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Return an iterator over (property, value) pairs for this style object.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    keys() → iterator[string]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Return an iterator over the CSS property names in this style object.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      update(updates=None, **kwargs)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Merge CSS properties into this style object. None or empty values remove properties.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        values() → iterator[string]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Return an iterator over the CSS property values in this style object.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          TextArea (more info)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Create a new ‘TextArea’ object


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Base class: anvil.Component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          TextArea([placeholder=], [auto_expand=], [spacing_above=], [spacing_below=], [margin=], [height=], [text=], [align=], [font_size=], [font=], [bold=], [italic=], [underline=], [enabled=], [background=], [foreground=], [border=], [visible=], [role=], [tooltip=], [tag=])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            TextArea Methods

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              focus()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Set the keyboard focus to this TextArea

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                select()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Select all the text in this TextArea

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TextArea Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  align - enum: "left", "center", "right"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Align this component’s text

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  auto_expand - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If true, the text area will expand vertically to fit its contents

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  background - color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The background colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  bold - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Display this component’s text in bold

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  border - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The border of this component. Can take any valid CSS border value.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  enabled - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  True if this component should allow user interaction.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  font - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The font to use for this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  font_size - number

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The height of text displayed on this component in pixels

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  foreground - color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The foreground colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  height - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The height of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  italic - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Display this component’s text in italics

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  margin - margin

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Margin for this component. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  parent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  placeholder - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The text to be displayed when the component is empty.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  role - themeRole

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The vertical space above this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The vertical space below this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  tag - object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Use this property to store any extra information about this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  text - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The text displayed on this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  tooltip - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Text to display when you hover the mouse over this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  underline - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Display this component’s text underlined

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  visible - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Should this component be displayed?


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TextArea Events

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  change()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  When the text in this text area is edited

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  show()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  When the TextArea is shown on the screen

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  hide()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  When the TextArea is removed from the screen

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  focus()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  When the TextArea gets focus

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  lost_focus()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  When the TextArea loses focus


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TextBox (more info)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Create a new ‘TextBox’ object


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Base class: anvil.Component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TextBox([placeholder=], [hide_text=], [type=], [spacing_above=], [spacing_below=], [margin=], [text=], [align=], [font_size=], [font=], [bold=], [italic=], [underline=], [enabled=], [background=], [foreground=], [border=], [visible=], [role=], [tooltip=], [tag=])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    TextBox Methods

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      focus()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Set the keyboard focus to this TextBox

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        select()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Select the text in this TextBox

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          TextBox Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          align - enum: "left", "center", "right"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Align this component’s text

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          background - color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The background colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          bold - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Display this component’s text in bold

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          border - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The border of this component. Can take any valid CSS border value.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          enabled - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          True if this component should allow user interaction.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          font - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The font to use for this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          font_size - number

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The height of text displayed on this component in pixels

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          foreground - color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The foreground colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          hide_text - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Display stars instead of the text in this box

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          italic - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Display this component’s text in italics

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          margin - margin

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Margin for this component. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          parent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          placeholder - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The text to be displayed when the component is empty.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          role - themeRole

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The vertical space above this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The vertical space below this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          tag - object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Use this property to store any extra information about this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          text - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The text displayed on this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          tooltip - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Text to display when you hover the mouse over this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type - enum: "text", "number", "email", "tel", "url"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          What type of data will be entered into this box?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          underline - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Display this component’s text underlined

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          visible - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Should this component be displayed?


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          TextBox Events

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          change()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          When the text in this text box is edited

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          pressed_enter()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          When the user presses Enter in this text box

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          show()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          When the TextBox is shown on the screen

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          hide()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          When the TextBox is removed from the screen

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          focus()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          When the TextBox gets focus

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          lost_focus()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          When the TextBox loses focus


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Timer (more info)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Create a new ‘Timer’ object


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Base class: anvil.Component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Timer([interval=])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Timer Methods

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Timer Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  interval - number

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The number of seconds between each tick. 0 switches the timer off.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  parent


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Timer Events

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  tick()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Every [interval] seconds. Does not trigger if [interval] is 0.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  show()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  When this timer's form is shown on the screen (or it is added to a visible form)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  hide()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  When this timer's form is hidden from the screen (or it is removed from a visible form)


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  URLMedia

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Create a Media object representing the data at a specific URL. Caution: Getting data from URLs directly in your code will often fail for security reasons, or fail to handle binary data.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Base class: anvil.Media

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  URLMedia(url)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    WithLayout

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Parent class of any form with a layout.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Base class: anvil.Component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    WithLayout()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    WithLayout Attributes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    layout - anvil.Component instance

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This form’s layout.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    XYPanel (more info)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Create a new ‘XYPanel’ object


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Base class: anvil.Container

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    XYPanel([spacing_above=], [spacing_below=], [margin=], [height=], [background=], [foreground=], [border=], [visible=], [role=], [align=], [tooltip=], [tag=])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      XYPanel Methods

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      add_component(component, [x=0], [y=0], [width=None])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Add a component to this XYPanel, at the specified coordinates. If the component’s width is not specified, uses the component’s default width.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          get_width() → number

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Get the width of this XYPanel, in pixels.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              XYPanel Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              align - enum: "left", "center", "right"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Align this component’s content

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              background - color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The background colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              border - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The border of this component. Can take any valid CSS border value.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              foreground - color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The foreground colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              height - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The height of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              margin - margin

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Margin for this component. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              parent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              role - themeRole

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The vertical space above this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The vertical space below this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              tag - object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Use this property to store any extra information about this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              tooltip - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Text to display when you hover the mouse over this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              visible - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Should this component be displayed?


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              XYPanel Events

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              show()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              When the XYPanel is shown on the screen

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              hide()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              When the XYPanel is removed from the screen


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              YouTubeVideo (more info)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Create a new ‘YouTubeVideo’ object


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Base class: anvil.Component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              YouTubeVideo([youtube_id=], [autoplay=], [loop=], [current_time=], [volume=], [state=], [duration=], [mute=], [spacing_above=], [spacing_below=], [margin=], [height=], [background=], [foreground=], [border=], [visible=], [role=], [tag=])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                YouTubeVideo Methods

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                add_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Add an event handler function to be called when the event happens on this component. Event handlers will be called in the order they are added. Adding the same event handler multiple times will mean it gets called multiple times.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  pause()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Pause this YouTube video

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  play()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Start playing this YouTube video

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  remove_event_handler(event_name, [handler_func])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Remove a specific event handler function for a given event. Calling remove_event_handler with just the event name will remove all the handlers for this event

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    set_event_handler(event_name, handler_func)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Set a function to call when the ’event_name’ event happens on this component. Using set_event_handler removes all other handlers. Setting the handler function to None removes all handlers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      stop()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Stop playing this YouTube video


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      YouTubeVideo Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      autoplay - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Set to true to play this video immediately

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      background - color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The background colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      border - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The border of this component. Can take any valid CSS border value.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      current_time - object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Get or set the current playback position, in seconds.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      duration - object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Get the duration of the video in seconds.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      foreground - color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The foreground colour of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      height - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The height of this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      loop - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Set to true to play this video repeatedly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      margin - margin

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Margin for this component. Only available in apps that have been migrated to use Layouts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      mute - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Set whether the video is muted or not.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      parent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      role - themeRole

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Choose how this component can appear, based on your app’s visual theme.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      spacing_above - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The vertical space above this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      spacing_below - enum: "none", "small", "medium", "large"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The vertical space below this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      state - object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Get the current playback state of the video as a string. E.g. PLAYING

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      tag - object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Use this property to store any extra information about this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      visible - boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Should this component be displayed?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      volume - object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Get or set the current volume, from 0 - 100.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      youtube_id - string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The ID of the YouTube video to play


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      YouTubeVideo Events

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      state_change(state)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      When the video changes state (eg PAUSED to PLAYING)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • state - The new state of the video (values from the YouTube API)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      show()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      When this video is shown on the screen (or it is added to a visible form)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      hide()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      When this video is hidden from the screen (or it is removed from a visible form)


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Functions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      alert(content, [title=""], [buttons=], [large=False], [dismissible=True], [role=])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Pop up an alert box. By default, it will have a single “OK” button which will return True when clicked.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        confirm(content, [title=""], [buttons=], [large=False], [dismissible=False], [role=])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Pop up a confirmation box. By default, it will have “Yes” and “No” buttons which will return True and False respectively when clicked.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          download(media)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Download the given Media Object immediately in the user’s browser.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            get_focused_component() → anvil.Component instance

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Get the currently focused Anvil component, or None if focus is not in a component.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            get_open_form()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Returns the form most recently opened with open_form().


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            get_url_hash()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Get the decoded hash (the part after the ‘#’ character) of the URL used to open this app. If the first character of the hash is a question mark (eg ‘#?a=foo&b=bar’), it will be interpreted as query-string-type parameters and returned as a dictionary (eg {‘a’: ‘foo’, ‘b’: ‘bar’}).


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            handle(component_name, event_name)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            When applied to a form method as a decorator, sets the decorated method as an event handler for the specified component event.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              is_server_side() → boolean

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Check whether Anvil is running server side or not.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              open_form(form, *args, **kwargs)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Open the specified form as a new page.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              If ‘form’ is a string, a new form will be created (extra arguments will be passed to its constructor). If ‘form’ is a Form object, it will be opened directly.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                set_default_error_handling(handler_fn)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Set a function to be called when an uncaught exception occurs. If set to None, a pop-up will appear letting the user know that an error has occurred.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  set_url_hash(val)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Sets the hash of the currently open URL. If val is a string, it is added to the URL after a #. If val is a dictionary, it will be interpreted as query-string-type parameters and added to the URL after a hash and question mark (eg ‘#?a=foo&b=bar’).


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Globals

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    app

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Information about the current app, as an instance of anvil.AppInfo



                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Do you still have questions?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Our Community Forum is full of helpful information and Anvil experts.