Difference between revisions of "RichMemo/FAQ"
From Free Pascal wiki
Jump to navigationJump to search(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | Forum Asked Questions | |
===Don't show horizontal bar=== | ===Don't show horizontal bar=== | ||
: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. | :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. | ||
:A: '''Horizontal scroll bar''' might not show up if '''WordWrap''' is enabled. | :A: '''Horizontal scroll bar''' might not show up if '''WordWrap''' is enabled. | ||
+ | ===Add text with font=== | ||
+ | :Q: how i can add text or line richmemo with font or textstyle? | ||
+ | :A: The fastest way is to use '''RichUtilsUtils''' which comes with RichMemo and call '''InsertFontText''' function | ||
+ | <source lang="delphi"> | ||
+ | uses ... RichUtilsUtils .. | ||
+ | |||
+ | .. | ||
+ | |||
+ | var | ||
+ | prms : TFontParams; | ||
+ | begin | ||
+ | prms := GetFontParams(RichMemo1.Font); | ||
+ | prms.Color := clBlue; | ||
+ | prms.Style := [fsBold]; | ||
+ | // this adds the blue and bolded Hello World at the end of the richmemo | ||
+ | // it's possible to pass the 4th parameter to the function to specify | ||
+ | // where the text should be added. By default - at the end. | ||
+ | InsertFontText(RichMemo1,'hello world', prms); | ||
+ | end;</source> | ||
+ | |||
+ | :RichMemo's base API has the action of inserting the text and applying the style separated. | ||
==See Also== | ==See Also== | ||
* [[RichMemo]] | * [[RichMemo]] | ||
[[Category:RichMemo]] | [[Category:RichMemo]] |
Latest revision as of 21:04, 29 September 2022
Forum Asked Questions
Don't show horizontal bar
- 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.
- A: Horizontal scroll bar might not show up if WordWrap is enabled.
Add text with font
- Q: how i can add text or line richmemo with font or textstyle?
- A: The fastest way is to use RichUtilsUtils which comes with RichMemo and call InsertFontText function
uses ... RichUtilsUtils ..
..
var
prms : TFontParams;
begin
prms := GetFontParams(RichMemo1.Font);
prms.Color := clBlue;
prms.Style := [fsBold];
// this adds the blue and bolded Hello World at the end of the richmemo
// it's possible to pass the 4th parameter to the function to specify
// where the text should be added. By default - at the end.
InsertFontText(RichMemo1,'hello world', prms);
end;
- RichMemo's base API has the action of inserting the text and applying the style separated.