Displayed line number

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2004


Displayed line number Longint

ParameterTypeDescription
This command does not require any parameters
Function resultLongintNumber of row being displayed

Description

The Displayed line number command only works with the On Display Detail form event. It returns the number of the row being processed while a list of records is displayed on screen. If Displayed line number is called other than when displaying a list, it returns 0.

If the displayed row is not empty (when it is linked to a record), the value returned by Displayed line number is identical to the value returned by Selected record number.

Like Selected record number, Displayed line number starts at 1.This command is useful if you want to process each row of a list form displayed on screen, including empty rows.

Example

This example lets you apply an alternating color to a list form displayed on screen, even for rows without records:

      `List form method
   If (Form event=On Display Detail)
      If (Displayed line number % 2 = 0)
            `Black on white for even row text
         SET RGB COLORS([Table 1]Field1; -1; 0x00FFFFFF)
      Else
            `Black on light blue for odd row text
         SET RGB COLORS([Table 1]Field1; -1; 0x00E0E0FF)
      End if
   End if


See Also

Form event, Selected record number.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next