Skip to content

Add access to selected char range on selectable labels #7542

@mankinskin

Description

@mankinskin

It would be nice to retrieve the selected character range on a selectable label:

let label = ui.add(Label::new(&text).selectable(true));
if let Some(range) = label.selected_char_range() {
    println!("Selected char range: {:?}", range);
}
label

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions