Articles   Members Online: 3
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to show bullets in a TRichEdit Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
14-Apr-04
Category
Reporting /Printing
Language
Delphi 3.x
Views
157
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Peter Below

How to show bullets in a TRichEdit? 

Answer:

1   uses
2     RichEdit;
3   
4   procedure TForm1.Button1Click(Sender: TObject);
5   var
6     fmt: TParaformat2;
7   begin
8     FillChar(fmt, SizeOf(fmt), 0);
9     fmt.cbSize := SizeOf(fmt);
10    // The PARAFORMAT2 structure is used to set the numbering style.
11    // This is done through the following structure members:
12    fmt.dwMask := PFM_NUMBERING or PFM_NUMBERINGSTART or PFM_NUMBERINGSTYLE or
13      PFM_NUMBERINGTAB;
14    // Set the following values (bitwise-or them together) to identify
15    // which of the remaining structure members are valid:
16    // PFM_NUMBERING, PFM_NUMBERINGSTART, PFM_NUMBERINGSTYLE, and PFM_NUMBERINGTAB
17    fmt.wNumbering := 2;
18    //0 no numbering or bullets
19    //1 (PFN_BULLET) uses bullet character
20    //2 Uses Arabic numbers (1, 2, 3, ...).
21    //3 Uses lowercase letters (a, b, c, ...).
22    //4 Uses uppercase letters (A, B, C, ...).
23    //5 Uses lowercase Roman numerals (i, ii, iii, ...).
24    //6 Uses uppercase Roman numerals (I, II, III, ...).
25    //7 Uses a sequence of characters beginning with the Unicode
26    //  character specified by the wNumberingStart member.
27    fmt.wNumberingStart := 1;
28    //  Starting value for numbering.
29    fmt.wNumberingStyle := $200;
30    // Styles for numbering:
31    // 0 : Follows the number with a right parenthesis.  1)
32    // $100 : Encloses the number in parentheses.       (1)
33    // $200 : Follows the number with a period.          1.
34    // $300 : Displays only the number.                  1
35    // $400 : Continues a numbered list without applying the next number or bullet.
36    // $8000 : Starts a new number with wNumberingStart.
37    fmt.wNumberingTab := 1440 div 4;
38    // Minimum space between a paragraph number and the paragraph text, in twips
39  
40    RichEdit1.Perform(EM_SETPARAFORMAT, 0, lParam(@fmt));
41  end;



			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC