4D v13.4SET LIST PROPERTIES |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v13.4
SET LIST PROPERTIES
SET LIST PROPERTIES
The SET LIST PROPERTIES command sets the appearance of the hierarchical list whose list reference you pass in list. The parameter appearance can be one of the following predefined constants provided by 4D in the Hierarchical Lists theme:
In the Windows appearance, the icon (+) denotes collapsed nodes, and the icon (–) denotes expanded nodes. Nodes without child items have no icon. Here is a default hierarchical list in Windows appearance: In the Macintosh appearance, a rightward-pointing arrow icon denotes the collapsed nodes, and a downward-pointing icon denotes the expanded nodes. Nodes without child items have no icon. Here is a default hierachical list in Macintosh appearance: If you display a hierarchical list object without calling SET LIST PROPERTIES or pass 0 in the appearence parameter, the list appears with the default Windows or Macintosh appearances, depending on the Platform Interface property choosen for the object in the Design environment's Form Editor. The parameter icon indicates the icons that will be displayed for each node. The value passed in icon sets the icon for collapsed nodes and icon+1 sets the icon for expanded nodes. For example, if you pass 15000, the color icon 'cicn' ID=15000 will be displayed for each collapsed node and the color icon 'cicn' ID=15001 will be displayed for each expanded node. It is therefore important to have these 'cicn' color icon resources present in your database structure file. If a color icon resource is missing, the corresponding nodes are displayed with no icons. (You can actually take advantage of this to display a list with no icons.) WARNING: When creating 'cicn' color icon resources, use resource IDs greater than or equal to 15000. Resource IDs less than 15000 are reserved for 4D. The resource IDs of the default Macintosh and Windows nodes are expressed by the following predefined constants provided by 4D:
In other words, 4D provides the following 'cicn' resources:
If you do not pass the parameter icon or pass 0, the nodes are displayed with the default icons of the chosen appearance type. Color icon resources can be of various sizes. For example, you can create 16x16 or 32x32 color icons. If you do not pass the parameter lineHeight, the line height of a hierarchical list is determined by the font and font size used for the object. If you use a color icon that is too tall or too wide, it will be displayed truncated and/or will be overridden by the text of the nodes above or below it. Choose color icon size, font, and font size accordingly, otherwise pass in the parameter lineHeight the minimal line height of the hierarchical list. If the value you pass is greater than the line height derived from the font and font size used, the line height of the hierarchical list will be forced to the value you pass. Note: SET LIST PROPERTIES affects the way nodes are displayed in the hierarchical list. If you would rather customize the icon of each item in the list, use the command SET LIST ITEM PROPERTIES. The optional parameter doubleClick allows you to define that a double-click on a parent list item will not provoke the sublist to expand or to collapse. By default, a double-click on a parent list item provokes its child list to expand or to collapse. However, some user interfaces may need to deactivate this behavior. To do this, the doubleClick parameter should be set to 1. The optional multiSelections parameter lets you indicate whether the list must accept multiple selections.
The optional editable parameter lets you indicate whether the list must be editable by the user when it is displayed as a choice list associated with a field or a variable during data entry. When the list is editable, a Modify button is added in the choice list window and the user can add, delete and sort the values through a specific editor. The following hierarchical list has been defined in the Design environment List Editor: Within a form, the hierarchical list object hlCities reuses that list with this object method: Case of In addition, the structure file of the database has been edited so it contains the following 'cicn' color icon resources: 1) With the following line: SET LIST PROPERTIES(hlCities;Ala Macintosh;Macintosh node) The hierarchical list will look like this: 2) With the following line: SET LIST PROPERTIES(hlCities;Ala Windows;Windows node) The hierarchical list will look like this: 3) With the following line: SET LIST PROPERTIES(hlCities;Ala Windows;20000) The hierarchical list will look like this: 4) With the following line: SET LIST PROPERTIES(hlCities;Ala Macintosh;20010) The hierarchical list will look like this: The 'cicn' color icon resources shown are then added to the structure file of the database: 5) With the following line: SET LIST PROPERTIES(hlCities;Ala Windows;20020;32) The hierarchical list will look like this: |
PROPERTIES
Product: 4D
INDEX HISTORY
Modified: 4D 2004 SEE ALSO
GET LIST ITEM PROPERTIES |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||