Difference between revisions of "RichMemo/Samples"

From Free Pascal wiki
Jump to navigationJump to search
Line 3: Line 3:
 
===Basics===
 
===Basics===
 
In order for tabs to work the text should be split tab character (#9)
 
In order for tabs to work the text should be split tab character (#9)
 +
 +
This is how the text would look like if no tab separation is used:
 +
 +
[[Image:richmemo_basic1.png]]
 +
 +
<source lang="delphi">
 +
  RichMemo1.Lines.Add('hello world');
 +
  RichMemo1.Lines.Add('this sample'); 
 +
</source>
 +
 +
 +
If the words are split by Tabs, then the control tries to find the next proper tab offset in order:
 +
 +
[[Image:richmemo_basic2.png]]
 +
 +
<source lang="delphi">
 +
  RichMemo1.Lines.Add('hello'#9'world');
 +
  RichMemo1.Lines.Add('this'+#9+'sample'); 
 +
</source>
 +
 
==See Also==
 
==See Also==
 
*[[RichMemo]]
 
*[[RichMemo]]
 
[[Category:RichMemo]]
 
[[Category:RichMemo]]

Revision as of 20:19, 28 June 2021

Tabs

Tabs are used to organize the text in table-like layout. This would not be a real layout table, but will make the text (if it's short enough) to look table alike.

Basics

In order for tabs to work the text should be split tab character (#9)

This is how the text would look like if no tab separation is used:

richmemo basic1.png

  RichMemo1.Lines.Add('hello world'); 
  RichMemo1.Lines.Add('this sample');


If the words are split by Tabs, then the control tries to find the next proper tab offset in order:

richmemo basic2.png

  RichMemo1.Lines.Add('hello'#9'world'); 
  RichMemo1.Lines.Add('this'+#9+'sample');

See Also