TE Edit Control Win32 / Win64 Help
Product page

TerSetListBullet

Set the paragraph bullet/numbering property.

BOOL TerSetListBullet(hWnd, set, NumType, level, start, TextBef, TextAft, repaint)
BOOL TerSetListBullet2(hWnd, set, NumType, level, start, TextBef, TextAft, ListText, repaint)
HWND hWnd;The handle of the window to be accessed.
BOOL set;TRUE to set the paragraph bullet/numbering or FALSE to remove it. The 'start', 'level', and 'type' parameters are ignored when the 'set' parameter is FALSE.
int NumTypeThis parameter allows you to apply a bullet or a numbered list. Please refer to the TerEditListLevel function for the list of available constants.
int level;list level (0 to 8). The default value for this parameter is 0.
int start;The starting number when setting paragraph numbering. Set to 1 for default.
LPBYTE TextBef;Text before the paragraph number. Set to "" for default. This parameter is ignored when ListText is not blank.
LPBYTE TextAft;Text After the paragraph number. Set to "" for default. This parameter is ignored when ListText is not blank.
LPBYTE ListText;

List text. For NumType prameter value other than NUM_BLT, please refer to the TerEditListLevel function for a description for this parameter.

When NumType parameter is LIST_BLT, the bullet character can be specified by passing one of the following constants as a one-character string to this parameter:

BLT_ROUNDRound bullet
BLT_SQUARESquare bullet
BLT_HOLLOW_SQUAREHollow square bullet
BLT_CHECKCheck mark bullet
BLT_DIAMONDDiamond bullet
BLT_4_DIAMONDS4 Diamonds bullet
BLT_ARROWArrow bullet
BOOL repaint;Repaint the screen after this operation

Description:

The TerSetListBullet method is a wrapper to the basic list mechanism functions: TerEditList, TerEditListOr, TerEditListLevel and TerSetParaList. This method provides most used features of the basic list functions. However, you might like to use the basic list function if you need further control of the lists. Please refer to the List Numbering chapter for a discussion of basic list functions.

Examples:

Create a decimal numbered list of level 0 where the numbering prints as:

(1), (2), (3), Etc

TOC.TerSetListBullet2(true,LIST_DEC,0,1,"","","(~1~)",true);

Create a decimal numbered list of level 0 where the numbering prints as:

1., 2., 3., Etc.

TOC.TerSetListBullet2(true,LIST_DEC,0,1,"","","~1~.",true);

Create a decimal numbered list of level 1 where the numbering prints as:

1.1, 1.2, 1.3, etc.

TOC.TerSetListBullet2(true,LIST_DEC,1,1,"","","~1~.~2~",true);

Create a standard bullet list of level 1 with round bullet:

TOC.TerSetListBullet2(true,LIST_BLT,1,1,"","","",true);

Create a diamond shaped bullet list of level 1:

bullet$=chr$(BLT_DIAMOND)

TOC.TerSetListBullet2(true,LIST_BLT,1,1,"","",bullet$,true);

Return Value: This function returns TRUE when successful.