Skip to main content
Version: 8.1

system.perspective.alterDock

New in 8.1.19

This function is used in Python Scripting.

Description​

Changes configuration of a specified dock on a Perspective page.

Syntax​

tip

This function accepts keyword arguments.

system.perspective.alterDock(dockId, [config], [sessionId], [pageId])

Parameters​

TypeParameterDescription
StringdockIdThe unique identifier of the dock to be modified. If no dock with the specified ID exists on the current page, a warning will be logged to the console.
ObjectconfigAn object containing the dock configuration to be applied when the script is run. If omitted, the dock configuration remains unchanged. [optional]

The following properties can included in the config object:
  • view: The view to be displayed in the dock.
  • viewParams: A dictionary of name and value pairs to be passed as parameters to the view.
  • display: The display state of the dock. Accepted values are:
    • push
    • cover
    • auto
  • size: The width or height of the dock, depending on orientation.
  • autoBreakpoint: The minimum page width at which a dock with "display = auto" remains visible. If the session width is smaller than this value, the dock is hidden and can be displayed on demand.
  • anchor: Determines whether the docked view remains visible while scrolling. Only available for North-docked views. Accepted values are:
    • fixed
    • scrollable
  • handle: Controls the visibility of a handle that allows users to expand or collapse the dock. Accepted values are:
    • show
    • hide
    • autoHide
  • handleIcon: The path to an icon used to represent the dock when it is hidden.
StringsessionIdThe ID of the session in which the dock modification is applied. If omitted, the modification applies to the current session. [optional]
StringpageIdThe ID of the page where the dock is located. If omitted, the modification applies to the current page. [optional]

Returns​

Nothing

Scope​

Perspective Session

Code Examples​

Code Snippet
# Change the size of a dock with the id 'my-dock-id'
system.perspective.alterDock('my-dock-id', { 'size': 500 } )