TE Edit Control Win32 / Win64 Help
Product page

TerEditListLevel

Edit the level properties for a list or a list-override item.

BOOL TerEditListLevel(hWnd, IsList, id, level, StartAt, NumType, CharAft, ListText, FontId, flags)
HWND hWnd;The handle of the window to be accessed
BOOL IsList;Set to TRUE to modify the level properties for a list item. Set to FALSE to modify the level properties for a list-override item. A list-override item is allowed only if it has the 'OverrideLevels' flag set (please refer to the TerEditListOr function).
int id;The id of the list or list-override item to modify.
int level;A valid level number. A simple list has only one level (level number 0). A nested list has 9 levels (0 to 8).
int StartAt;The starting number for a level. A typical value would be 1.
int NumType;Use one of the following number type constants:
LIST_DECDecimal number
LIST_UPR_ROMANUppercase roman letters
LIST_LWR_ROMANLowercase roman letters
LIST_UPR_ALPHAUppercase alphabets
LIST_LWR_ALPHALowercase alphabets
LIST_DEC_PADPadded decmial numbers
LIST_BLTBullet (no numbering)
LIST_NO_NUMHidden
int CharAft;The character between the bullet text and the body text:
LISTAFT_TABTabbed space
LISTAFT_SPACESingle space
LISTAFT_NONENo space
LPBYTE ListText.

The text printed for the paragraph number. The level number information can be embedded in this text surrounded by a pair or '~' characters.

For example, specify the following list text to print the numbers in the n.n formats:

~1~.~2~

The editor will replace the ~1~ string by the current number value for level 1. Similarly, the editor will replace the ~2~ string by the current number value for level 2. The result might as following:

1.1 Item 1

1.2 Item 2

1.3 Item 3

Similarly, a ListText of (~1~) would print the paragraph numbers as following:

(1) Item 1

(2) Item 2

(3) Item 3

A bullet character can also be specified by passing a one character string. The first character of this string would contain the BLT_ constant. Please refer to the TerSetListBullet function for a description of the available BLT_constants.

int FontId;A valid font id (0 to TotalFonts-1) to print the paragraph number text.
DWORD flags;One or more of the following flags bits can be specified:
LISTLEVEL_RESTARTRestart the paragraph number for a list-override level. This flag is valid only for a list-override level. When this flag is not specified, the numbering may be continued among multiple list-overrides for sharing the same list.
LISTLEVEL_REFORMATUse the font information as specified by the list-override level. This flag is valid only for a list-override level.
LISTLEVEL_LEGALThis allows the previous upper level number to be printed in the Arabic numbering format.
LISTLEVEL_NO_RESETDo not restart the level number when an upper level text is encountered.

Description: This function allows you edit the default properties for a list or list-override level.

Return Value: When successful, this function returns a TRUE value.