View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004677 | JEDI VCL | 00 JVCL Components | public | 2009-01-28 01:17 | 2009-04-29 12:11 |
Reporter | hodgsoni | Assigned To | obones | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | not fixable | ||
Product Version | 3.36 | ||||
Target Version | Fixed in Version | ||||
Summary | 0004677: JvRichEdit SelStart incorrect | ||||
Description | JvRichEdit.SelStart is one less than it should be for every line entered into the RichEdit. If you monit selstart and type into a richedit like so : 12345678 (SelStart = 8 which is correct) 12345678 (SelStart = 17, should be 18) 12345678 (SelStart = 26, should be 28) etc | ||||
Additional Information | As a workaround I am doing the following when I need to use SelStart: SelStartWorkAround := reEditor.SelStart + CharPos.Y - 1; where CharPos.Y = current line number | ||||
Tags | No tags attached. | ||||
|
Please provide the zipped sources of a sample application showing this. |
2009-02-02 03:14
|
JvRichEditBug.zip (8,756 bytes) |
|
I'm seeing it as well, but don't know yet why it does this. |
|
This is "as designed" because TJvRichEdit uses RichEdit 2 which uses a single "LF" as its internal end of line character. TRichEdit uses RichEdit 1 which uses a "CR/LF" pair, as documented here: http://msdn.microsoft.com/en-us/library/bb787873.aspx look after the table for RichEdit 2. As a result, using SelStart inside "Text" is wrong and cannot be relied upon. Fortunately, there is the GetTextRange function in TJvRichEdit that you can use: Label3.Caption := GetTextRange(SelStart, SelStart + 5 - 1); This works just fine. |
Date Modified | Username | Field | Change |
---|---|---|---|
2009-01-28 01:17 | hodgsoni | New Issue | |
2009-02-02 01:27 | obones | Note Added: 0015279 | |
2009-02-02 01:27 | obones | Status | new => feedback |
2009-02-02 03:14 | hodgsoni | File Added: JvRichEditBug.zip | |
2009-04-29 11:56 | obones | Note Added: 0015454 | |
2009-04-29 11:56 | obones | Status | feedback => confirmed |
2009-04-29 12:11 | obones | Note Added: 0015455 | |
2009-04-29 12:11 | obones | Status | confirmed => resolved |
2009-04-29 12:11 | obones | Resolution | open => not fixable |
2009-04-29 12:11 | obones | Assigned To | => obones |