trame.widgets.dockview module
- class trame.widgets.dockview.DockView(**kwargs)
Bases:
AbstractElementDockView component.
- Args:
- theme (string):
Theme to use for the layout manager. Possible values are: [
Abyss, AbyssSpaced, Dark, Dracula, Light, LightSpaced, Replit, VisualStudio,
]
- components (dict):
Map of components to replate using template names. Possible components to override:
watermarkComponent, rightHeaderActionsComponent, prefixHeaderActionsComponent, leftHeaderActionsComponent, defaultTabComponent
- default_renderer (string):
Possible values: always | onlyWhenVisible
- disable_auto_resizing (bool):
Disable the auto-resizing which is controlled through a ResizeObserver. Call .layout(width, height) to manually resize the container.
- disable_dnd (bool):
Disable drag and drop.
- disable_floating_groups (bool):
Disable floating groups.
- disable_tabs_overflow_list (bool):
Disable tabs overflow list.
dnd_edges (bool): floating_group_bounds (dict|string):
{ minimumHeightWithinViewport: number, minimumWidthWithinViewport: number } | ‘boundedWithinViewport’
- hide_borders (bool):
Hide borders
locked (bool): no_panels_overlay (string):
Define the behaviour of the dock when there are no panels to display. Defaults to watermark. Options: watermark | emptyGroup
- popout_url (string):
Popup url
- scrollbars (string):
Select native to use built-in scrollbar behaviours and custom to use an internal implementation that allows for improved scrollbar overlay UX. This is only applied to the tab header section. Defaults to custom. Options: custom | native
- single_tab_mode (string):
Options: default | fullwidth
- ready (event):
Event emitted when the component is ready.
- active_panel (event):
Event emitted when a panel is activated. The $event will be equal to the id used when creating the panel.
- removePanel (event):
Event emitted when a panel is removed. The $event will be equal to the panel id provided at the panel creation.
- add_panel(id, title, template_name, **add_on)
Add a new panel to the layout. This can only be called once the widget is ready.
- Args:
- id (string):
Unique identifier for that panel
- title (string):
Title showing up in the tab.
- template_name (string):
Name of the trame layout to be placed inside the panel.
- **kwargs:
Additional parameter to control where the panel should be added. (https://dockview.dev/docs/core/panels/add#positioning-the-panel)
- remove_panel(id)
Remove/Close an existing panel within the layout. This can only be called once the widget is ready.
- Args:
- id (string):
Unique identifier for that panel
- active_panel(id)
Activate an existing panel within the layout. This can only be called once the widget is ready.
- Args:
- id (string):
Unique identifier for that panel