a2d icon indicating copy to clipboard operation
a2d copied to clipboard

Line Edit: Support Selection

Open frankmilliron opened this issue 1 year ago • 2 comments

Just a thought... Allow double-clicking on the typed city name or OA-A to select all in Maps entry box.

frankmilliron avatar Jun 14 '24 01:06 frankmilliron

Line Edit controls don't have support for selection. So it's not just a Maps thing.

inexorabletash avatar Jun 14 '24 02:06 inexorabletash

Renamed the issue. The work needed would be:

  • LineEditRecord replace caret_pos with sel_start and sel_end
  • When sel_start == sel_end then show a blinking caret as today
  • Otherwise, draw the selected range in inverse.
  • Keyboard
    • Left/Right Arrow - if selection, collapse selection to start/end
    • OA/SA + Left/Right Arrow - if selection, collapse selection and move caret to start/end of string
    • Shift + Left/Right Arrow - move start/end of selection one character
    • OA/SA + Shift + Left/Right Arrow - move start/end of selection to start/end of string
    • Backspace, Ctrl+F, Ctrl+X - if selection, delete selection
    • Printable - if selection, replace selection / insert character
  • Mouse
    • Double-click - select all
    • Mouse drag - select dragged range
    • Mouse click - collapse selection, place caret
  • API
    • Option when initializing to select all or just caret

inexorabletash avatar Jun 22 '24 16:06 inexorabletash