Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 20 of 21 total
Thread Suggestion: Clipboard API support
Fri, Sep 16 2016 4:00 PMPermanent Link

Trinione

Now seeing these responses.

Thank you both.
Fri, Sep 16 2016 4:46 PMPermanent Link

Trinione

Neither suggestions by Raul or Tim worked. Frown

No errors when either is run, but selected text is not copied.
Fri, Sep 16 2016 5:07 PMPermanent Link

Raul

Team Elevate Team Elevate

On 9/16/2016 4:46 PM, Trinione wrote:
> Neither suggestions by Raul or Tim worked. Frown
>
> No errors when either is run, but selected text is not copied.

It definitely works for me.

Can you elaborate on exact  browser and how/what you are copying exactly.

Raul
Fri, Sep 16 2016 5:17 PMPermanent Link

Trinione

Raul wrote:
<< It definitely works for me.
Can you elaborate on exact  browser and how/what you are copying exactly. >>

Raul:
Browser: Version 53.0.2785.116 m (64-bit)

Copying text content from a MultiLineEdit.
Fri, Sep 16 2016 6:27 PMPermanent Link

Trinione

Raul wrote:
<< It definitely works for me. >>

I started a brand new project and it works as expected. Shall test some more from within my project. If any more issues I shall return to this thread.

Thx.
Fri, Sep 16 2016 6:31 PMPermanent Link

Raul

Team Elevate Team Elevate

On 9/16/2016 5:17 PM, Trinione wrote:
> Browser: Version 53.0.2785.116 m (64-bit)
> Copying text content from a MultiLineEdit.

I did couple of tries and there might a focus issue at play.

If i select all in code (and i guess focus is set at the time same) then
everything works Ok:

   MultiLineEdit1.SelectAll;
   window.document.execCommand('copy',True,False);

However if i manually select text and just call copy the it sometimes
does not work :

   window.document.execCommand('copy',True,False);


Setting the focus back to edit before copy seems to work for me every
time with user selected text :

   MultiLineEdit1.SetFocus;
   window.document.execCommand('copy',True,False);

This might require bit deeper dive.

Raul
Fri, Sep 16 2016 7:08 PMPermanent Link

Trinione

Raul wrote:
<< Setting the focus back to edit before copy seems to work for me every
time with user selected text >>

Yes. I discovered pretty much the same thing. Both your code works because of the 'SelectAll' method.

I shall try the SetFocus also.

Delved into it a bit, and in WebUI a line 'setSelectionRange(0,Length(InputValue));' is used.


<< This might require bit deeper dive. >>

This also has me thinking I need to Disable the default Right-Click on the mouse and create my own Context Menus.
Fri, Sep 16 2016 7:22 PMPermanent Link

Trinione

Seems the SetFocus to get the selected text works. I can work with that.

My fantasy Selection/Cut/Copy/Paste functionality is one where the relevant buttons/icons appear and disappear upon text selection/deselection. Smile

However... reality is a factor and I am now on to see if I can detect the last position of the mouse so a 'focus' on that area can deselect the highlighted text.
Fri, Sep 16 2016 7:26 PMPermanent Link

Trinione

<< ...if I can detect the last position of the mouse so a 'focus' on that area can deselect the highlighted text.>>

Actually, I need to know how to get the Cursor position in a MultiLineEdit Control since the user may be using the keyboard for selection. I may post this in the General thread if I don't get an answer here.
Sat, Sep 17 2016 11:17 AMPermanent Link

Raul

Team Elevate Team Elevate

On 9/16/2016 7:26 PM, Trinione wrote:
> Actually, I need to know how to get the Cursor position in a MultiLineEdit Control since the user may be using the keyboard for selection. I may post this in the General thread if I don't get an answer here.

I have a suggestion on that so will post there

Raul

« Previous PagePage 2 of 3Next Page »
Jump to Page:  1 2 3
Image