trichedit

Loading RTF file having Table in TRichEdit without Table borders

断了今生、忘了曾经 提交于 2020-01-24 14:13:08
问题 I have a RTF file that I am loading into a TRichEdit control. Only problem that I am facing is, RTF file has Tables in it, loading the same shows table borders. But when I load the same RTF in MS Word it doesn't show any borders(Client want the same behavior). Is there any way for not displaying borders of table while loading into TRichEdit. I am using Delphi7. 回答1: TRichEdit control is less complete than MS Word, in its implementation of the RTF format. As far as I remember, TRichEdit won't

Loading RTF file having Table in TRichEdit without Table borders

六眼飞鱼酱① 提交于 2020-01-24 14:12:07
问题 I have a RTF file that I am loading into a TRichEdit control. Only problem that I am facing is, RTF file has Tables in it, loading the same shows table borders. But when I load the same RTF in MS Word it doesn't show any borders(Client want the same behavior). Is there any way for not displaying borders of table while loading into TRichEdit. I am using Delphi7. 回答1: TRichEdit control is less complete than MS Word, in its implementation of the RTF format. As far as I remember, TRichEdit won't

How can I change the color of certain characters in a TRichEdit? [closed]

Deadly 提交于 2020-01-11 11:11:50
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 8 years ago . I'm doing a Delphi 7 project where I have to let a user enter in a number (Layers going down) to build a Christmas tree, but I also need to display the output as * (stars). I am having a problem editing a certain

How can I change the color of certain characters in a TRichEdit? [closed]

…衆ロ難τιáo~ 提交于 2020-01-11 11:11:30
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 8 years ago . I'm doing a Delphi 7 project where I have to let a user enter in a number (Layers going down) to build a Christmas tree, but I also need to display the output as * (stars). I am having a problem editing a certain

Adding true hyperlink support to TRichEdit

痴心易碎 提交于 2019-12-24 06:26:11
问题 I need support for "friendly name hyperlink" in TRichEdit and all solutions I have found are based on autoURLs (EM_AUTOURLDETECT) which works by detecting strings entered by user that start with www (or http). But I want to place links on strings that does not start with www. Example: 'Download'. 回答1: You need to do the following: send the RichEdit an EM_SETEVENTMASK message to enable the ENM_LINK flag. Do this once after the RichEdit has been created, and then do it again every time the

Is it possible to avoid a TRichEdit losing its focus when clicking a button (e.g. Bold)?

雨燕双飞 提交于 2019-12-11 07:32:42
问题 Using delphi and rich edit, I need to replicate something along the lines of this very editor I'm writing in, when you select a text and press on the Bold button, the text remains selected instead of unselecting and losing focus. How can I achieve this? Thank you. 回答1: OK, now I think I see the issue. You have a TRichEdit and a TButton . Then you do something like procedure TForm1.Button1Click(Sender: TObject); begin with RichEdit1.SelAttributes do Style := Style + [fsBold]; end; and you are

Delphi: Center Specific Line in TRichEdit by Scrolling

跟風遠走 提交于 2019-12-08 03:12:26
问题 I have a Delphi 2007 TRichEdit with several lines in it. I want to scroll the richedit vertically such that a specific line number if approximately centered in the visible/display area of the richedit. For example, I want to write the code for CenterLineInRichEdit in this example: procedure CenterLineInRichEdit(Edit: TRichEdit; LineNum: Integer); begin ... Edit.ScrollTo(...); end; procedure TForm1.FormCreate(Sender: TObject); var REdit: TRichEdit; i: Integer; begin REdit := TRichEdit.Create

Delphi 7 TRichTextEdit Text in a box not displaying correctly

别来无恙 提交于 2019-12-08 02:25:25
问题 Using delphi 7 TRichEdit component, RTF data is being imported from a msword document through copy and paste, but if data is contained in a box, it is not displaying correctly i.e. Please assist 回答1: Try to use the following, it should subclass the TRichEdit class to version 4.1. However I don't know if Delphi 7 supports interposed classes, so just try to paste the following code and try to build the project. If it compiles then if you put a TRichEdit component and run the project you should

Delphi 7 TRichTextEdit Text in a box not displaying correctly

寵の児 提交于 2019-12-06 07:31:59
Using delphi 7 TRichEdit component, RTF data is being imported from a msword document through copy and paste, but if data is contained in a box, it is not displaying correctly i.e. Please assist Try to use the following, it should subclass the TRichEdit class to version 4.1. However I don't know if Delphi 7 supports interposed classes, so just try to paste the following code and try to build the project. If it compiles then if you put a TRichEdit component and run the project you should get RichEdit 4.1. unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics,

Using TRichEdit at runtime without defining a parent

淺唱寂寞╮ 提交于 2019-11-27 12:09:36
I need to use a TRichEdit at runtime to perform the rtf to text conversion as discussed here . I succeded in doing this but I had to set a dummy form as parent if not I cannot populate the TRichedit.Lines. (Error: parent is missing). I paste my funciton below, can anyone suggest a way to avoid to define a parent? Can you also comment on this and tell me if you find a more performant idea? Note: I need a string, not TStrings as output, this is why it has been designed like this. function RtfToText(const RTF: string;ReplaceLineFeedWithSpace: Boolean): string; var RTFConverter: TRichEdit;