We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Text selection in TextCell

Thread ID:





15325 Jun 16,2004 11:37 AM UTC Jun 16,2004 12:17 PM UTC WinForms 1
Tags: GridControl
Asked On June 16, 2004 11:37 AM UTC

I want to be able to select text in a textboxcell like in any other textbox (with control + shift + arrow keys). It seems that there is not behaviour like this in the version. So I created my own one: in KeyDown of a cellrenderer derived from the GridOriginalTextBoxCellRenderer class I change SelectionStart and SelectionLength of the textbox. All works fine, but I cannot select text from the right to the left (Ctrl+Shift+Left) if starting at the end of the text, because the caret always go to the end of the selected text. I added a sample which shows the described behaviour. Is there any way around that? Peter SampleSelect_5625.zip

Administrator [Syncfusion]
Replied On June 16, 2004 12:17 PM UTC

So, in your control things don''t work nicely becuase when you move to the left, the caret always ends up on the right side of the selection. I think you can move the cursor to the left side of a selection by doing a ''fake left click'' at that point. In this code snippet, replace activeRichTextBox with the active richtext control in your renderer code. p = Me.activeRichTextBox.GetPositionFromCharIndex(selectionStart) Syncfusion.Drawing.ActiveXSnapshot.FakeLeftMouseClick(Me.activeRichTextBox, p)


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon