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.
Unfortunately, activation email could not send to your email. Please try again.

Text selection in TextCell

Thread ID:

Created:

Updated:

Platform:

Replies:

15325 Jun 16,2004 07:37 AM Jun 16,2004 08:17 AM Windows Forms 1
loading
Tags: GridControl
Peter
Asked On June 16, 2004 07:37 AM

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 1.6.1.8 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 08:17 AM

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)

CONFIRMATION

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.

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.

;