Highlight all text of a RibbonTextBox when it has focus
How can I highlight all the text of a RibbonTextBox control when it gets focus?
Thank you
Thank you
SIGN IN To post a reply.
5 Replies
BK
Bharadhi K
Syncfusion Team
April 22, 2015 06:31 AM UTC
Hi Constantin Patak,
Thank you for your interest in Syncfusion products.
We can highlight all the Text of the RibbonTextBox control by invoking the "SelectAll" method. We have prepared a sample to demonstrate the same. In the sample, we have added three RibbonTextBox to the RibbonBar and for the second RibbonTextBox we have invoked the SelectAll method in the GotFocus event. Please find the sample in the following link.
Sample: RibbonSample.zip
Could you please let us know if our solution fulfills your requirements and if you require further assistance on this.
Regards,
Bharadhi K
Thank you for your interest in Syncfusion products.
We can highlight all the Text of the RibbonTextBox control by invoking the "SelectAll" method. We have prepared a sample to demonstrate the same. In the sample, we have added three RibbonTextBox to the RibbonBar and for the second RibbonTextBox we have invoked the SelectAll method in the GotFocus event. Please find the sample in the following link.
Sample: RibbonSample.zip
Could you please let us know if our solution fulfills your requirements and if you require further assistance on this.
Regards,
Bharadhi K
CP
Constantin Patak
April 22, 2015 12:32 PM UTC
Hello Bharadhi,
Thank you for your quick reply.
I have seen the sample and I am experience the following issues:
Thank you for your quick reply.
I have seen the sample and I am experience the following issues:
- When I click the second RibbonTextBox (the one with the GotFocus event) it selects all the text and instantly deselects it
- And in the following scenario: click in the second RibbonTextBox -> click in the text under the Ribbon -> click again in the second RibbonTextBox, the GotFocus event does not trigger again.
Is there a way to deal with these two problems.
Thank you
BK
Bharadhi K
Syncfusion Team
April 23, 2015 05:37 AM UTC
Hi Constantin Patak,
Query 1: When I click the second RibbonTextBox (the one with the GotFocus event) it selects all the text and instantly deselects it
In our earlier sample we had given for Keyboard Focus. Now we have modified the sample for both Mouse and Keyboard focus. In the sample, we have handled the PreviewMouseLeftButtonDown event and set Focus to the RibbonTextBox. Also we have used GotKeyboardFocus event in place of GotFocus for setting focus theough Keyboard.
Query 2: And in the following scenario: click in the second RibbonTextBox -> click in the text under the Ribbon -> click again in the second RibbonTextBox, the GotFocus event does not trigger again.
We have checked this with MS TextBox and it has the same behavior. We have modified the sample as mentioned above, to provide focus on mouse events separately.
Please find the modified sample in the following link.
Sample: Ribbon_131602.zip
Please let us know if our solution fulfills your requirements and if you require further assistance on this.
Regards,
Bharadhi K
Query 1: When I click the second RibbonTextBox (the one with the GotFocus event) it selects all the text and instantly deselects it
In our earlier sample we had given for Keyboard Focus. Now we have modified the sample for both Mouse and Keyboard focus. In the sample, we have handled the PreviewMouseLeftButtonDown event and set Focus to the RibbonTextBox. Also we have used GotKeyboardFocus event in place of GotFocus for setting focus theough Keyboard.
Query 2: And in the following scenario: click in the second RibbonTextBox -> click in the text under the Ribbon -> click again in the second RibbonTextBox, the GotFocus event does not trigger again.
We have checked this with MS TextBox and it has the same behavior. We have modified the sample as mentioned above, to provide focus on mouse events separately.
Please find the modified sample in the following link.
Sample: Ribbon_131602.zip
Please let us know if our solution fulfills your requirements and if you require further assistance on this.
Regards,
Bharadhi K
CP
Constantin Patak
April 23, 2015 01:12 PM UTC
Hi Bharadhi,
The sample works perfectly.
Thanks a lot for your help.
The sample works perfectly.
Thanks a lot for your help.
SC
Saranya CJ
Syncfusion Team
April 24, 2015 06:52 AM UTC
Hi Constantin,
Thank you for your update. Please let us know if you require any other assistance on this.
Regards,
Saranya
Thank you for your update. Please let us know if you require any other assistance on this.
Regards,
Saranya
SIGN IN To post a reply.
- 5 Replies
- 3 Participants
-
CP Constantin Patak
- Apr 21, 2015 07:58 PM UTC
- Apr 24, 2015 06:52 AM UTC