This is a migrated thread and some comments may be shown as answers.

Chat - How to choose text and copy

5 Answers 212 Views
Conversational UI, Chat
This is a migrated thread and some comments may be shown as answers.
Nguyen
Top achievements
Rank 1
Nguyen asked on 14 Sep 2019, 08:51 AM

Hello, how can I choose a text message and copy it. The attribute CanFocus = True but I cannot select the text message.

Please let me know how to solve my problem. Tks

Dess | Tech Support Engineer, Principal
Telerik team
commented on 14 Mar 2024, 05:32 AM

Hi, Nguyen,

The following KB article demonstrates a sample approach how to achieve such a behavior: How to Select and Copy Text in Chat Messages

I believe that it would be applicable for your scenario.

5 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 18 Sep 2019, 03:13 PM
Hello, Nguyen,

The possible solution that I can suggest for copying a message in RadChat is to assign a RadContextMenu with a Copy menu item. When you right click a message and select Copy, the respective message's content will be set to the clipboard. Then, you can paste it. I have prepared a sample code project for your reference. Please refer to the attached zip file.

Note that this is just a sample approach and it may not cover all possible cases. Feel free to modify it in a way which suits your requirement best.
 
I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

RadChat for Winforms
0
Ali
Top achievements
Rank 1
answered on 01 Jan 2020, 07:29 AM
Hello

Implementing the suggested system , we've faced some problems about Right-to-Left-language messages:
The TextBox object appears in wrong word order (last word comes first).
I've set righttoleft attribute to true (in CustomChat Classes) wherever it was possible , but the problem is still there.
Would you please clarify about RTL messages in the code?
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 03 Jan 2020, 10:44 AM

Hello, Ali,   

Following the provided information, I was unable to reproduce the issue you are facing. Please refer to the attached below screenshot illustrating the behavior on my end with the specified version. I have attached my sample project. 

Am I missing something? Could you please specify the exact steps how to reproduce the problem?

Alternatively, feel free to submit a support ticket from your account where you can provide additional information about the precise case together with a sample project demonstrating the undesired behavior. Thus, our support engineers will get better understanding of the precise case and assist you further. Thank you in advance.

I am looking forward to your reply.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

RadChat for Winforms
0
Ali
Top achievements
Rank 1
answered on 07 Jan 2020, 07:59 AM
Hello Dess,

The problem is that, the sample project you have sent (which works flawlessly) is in VB and mine is written in C# and they are almost impossible to compare.

I followed the guide in the link below:
https://docs.telerik.com/devtools/winforms/knowledge-base/how-to-select-and-copy-text-in-chat-messages

Everything sounds good except the RTL problem appearing in copy/select mode (Note: It is working error-free without assigning a chat factory). 
Would you please post an equivalent code in C# with the capability of selecting/copying messages which works with RTL languages?
Thanks in advance ...
Ali


0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 08 Jan 2020, 09:41 AM

Hello, Ali,   

The referred implementation in the KB article about selecting a text from the message and copying it, uses a RadTextBoxControlElement for the visual messages. Note that RadTextBoxControlElement doesn't support Right-To-Left functionality. That is why it is necessary to use RadTextBoxElement which internally hosts the standard MS TextBox and it supports RTL.

Since RadTextBoxElement hosts the MS TextBox, you should note that it may slow down the scrolling and will cause visual glitches when scrolling as controls do not support clipping. 

I have attached the modified sample project in C# and RTL support. Note that this is just a sample approach and it may not cover all possible cases. Feel free to modify and extend it in a way which suits your custom requirements best.

I hope this information helps.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

RadChat for Winforms

Naresh
Top achievements
Rank 1
commented on 13 Mar 2024, 08:47 PM

How to use shortcut key to copy the

text from textboxelement.

instead of contextmenu.

??

Tags
Conversational UI, Chat
Asked by
Nguyen
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Ali
Top achievements
Rank 1
Share this question
or