RichMemo/FAQ: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: RichMemo/FAQ
| Old | New | Line | |
|---|---|---|---|
| 1 | + | Forum Asked Questions | |
| 2 | + | ||
| 3 | + | ### Don't show horizontal bar | |
| 4 | + | ||
| 5 | + | ||
| 6 | + | Q: I started to work with richmemo but don't show me horizontal bar only vertical bar even i typing or loadfile, in properties i select SSboth on srcollbars. | |
| 7 | + | ||
| 8 | + | A: **Horizontal scroll bar** might not show up if **WordWrap** is enabled. | |
| 9 | + | ||
| 10 | + | ### Add text with font | |
| 11 | + | ||
| 12 | + | ||
| 13 | + | Q: how i can add text or line richmemo with font or textstyle? | |
| 14 | + | ||
| 15 | + | A: The fastest way is to use **RichUtilsUtils** which comes with RichMemo and call **InsertFontText** function | |
| 16 | + | ||
| 17 | + | ```delphi | |
| 18 | + | uses ... RichUtilsUtils .. | |
| 19 | + | ||
| 20 | + | .. | |
| 21 | + | ||
| 22 | + | var | |
| 23 | + | prms : TFontParams; | |
| 24 | + | begin | |
| 25 | + | prms := GetFontParams(RichMemo1.Font); | |
| 26 | + | prms.Color := clBlue; | |
| 27 | + | prms.Style := [fsBold]; | |
| 28 | + | // this adds the blue and bolded Hello World at the end of the richmemo | |
| 29 | + | // it's possible to pass the 4th parameter to the function to specify | |
| 30 | + | // where the text should be added. By default - at the end. | |
| 31 | + | InsertFontText(RichMemo1,'hello world', prms); | |
| 32 | + | end; | |
| 33 | + | ``` | |
| 34 | + | ||
| 35 | + | ||
| 36 | + | RichMemo's base API has the action of inserting the text and applying the style separated. | |
| 37 | + | ||
| 38 | + | ## See Also | |
| 39 | + | ||
| 40 | + | - [[RichMemo]] | |
| 41 | + | ||
| 42 | + | --- | |
| 43 | + | *From the Free Pascal wiki, page "RichMemo/FAQ", as it stood on 2022-09-29 after a change by Skalogryz, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* | |
| 44 | + | Category: RichMemo |
