GET LIST PROPERTIES

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 (Modified)


GET LIST PROPERTIES (list; appearance{; icon{; lineHeight{; doubleClick{; multiSelections{; editable}}}}})

ParameterTypeDescription
listListRefList reference number
appearanceNumberGraphical style of the list
1 = Hierarchical list a la Macintosh
2 = Hierarchical list a la Windows
iconNumber'cicn' Mac OS-based resource ID
lineHeightNumberMinimal line height expressed in pixels
doubleClickLongintExpand/Collapse sublist on double-click?
0 = Yes, 1= No
multiSelectionsLongintMultiple selections: 0 = No, 1 = Yes
editableLongintList editable by user: 0 = No, 1 = Yes

Description

The GET LIST PROPERTIES command returns information about the list whose reference number you pass in list.

The parameter appearance returns the graphical style of the list.

The parameter icon returns the resource IDs of the node icons displayed in the list.

The parameter lineHeight returns the minimal line height.

If doubleClick is set to 1, double-clicking on a parent list item does not provoke its child list to expand or to collapse. If doubleClick is set to 0, this behavior is active (defaut value).

If the multiSelections parameter is set to 0, multiple selections of items (manually or by programming) are not possible in the list. If it is set to 1, multiple selections are allowed.

If the editable parameter is set to 1, the list is editable when it is displayed as a list in the User environment. If it is set to 0, the list is not editable.

These properties can be set using the command SET LIST PROPERTIES and/or in the Design environment List Editor, if the list was created there or saved using the command SAVE LIST.

For a complete description of the appearance, node icons, minimal line height and double-click management of a list, see the command SET LIST PROPERTIES.

Example

Given the list named hList, shown here in the User environment:

The object method for a button:

      ` bMacOrWin button Object Method
   GET LIST PROPERTIES(hList;$vlAppearance;$vlIcon;$vlLH;$vlClick;$vlSelect;$vlModif)
   If ($vlAppearance=Ala Macintosh)
      $vlAppearance:=Ala Windows
      $vlIcon:=Windows node
      $vlModif:=1
   Else 
      $vlAppearance:=A la Macintosh
      $vlIcon:=Macintosh node
       $vlModif:=1
   End if 
   SET LIST PROPERTIES(hList;$vlAppearance;$vlIcon;$vlLH;$vlClick;$vlSelect;$vlModif)
   REDRAW LIST(hList) ` Do NOT forget to call REDRAW LIST; otherwise the list won't be updated

This method lets you display the list as follows:

See Also

SET LIST PROPERTIES.


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