Skip to main content

SelectionContainer

Function SelectionContainer 

Source
pub fn SelectionContainer(_: SelectionContainerProps) -> Element
Expand description

A region whose text can be dragged over and copied as one selection.

Every Text inside it, however deep and however many, is part of the same selection, so a whole message of paragraphs, list items and code can be picked up in one drag and copied with a line break between each block. Text outside one cannot be selected at all, which is what keeps button labels and destinations from being dragged over as though the screen were a document.

Buttons, checkboxes and the other controls inside it are left out of the selection and keep working as they always do.

Nothing about selecting or copying reaches this side. What is selected, the copy shortcut, the context menu and the clipboard all belong to the Renderer, so there is no event to handle and no way to read or set the selection from here.

ยงProps

For details, see the props struct definition.