SET LIST ITEM 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)


SET LIST ITEM PROPERTIES (list; itemRef | *; enterable; styles; icon{; color})

ParameterTypeDescription
listListRefList reference number
itemRef | *Longint | *Item reference number, or
0 for last item appended to the list, or
* for the current list item
enterableBooleanTRUE = Enterable, FALSE = Non-enterable
stylesNumberFont style for the item
iconNumber'cicn' Mac OS-based resource ID, or
65536 + 'PICT' Mac OS-based resource ID, or
131072 + Picture Reference Number
colorLongintRGB color value or
-1 = reset to original color

Description

The SET LIST ITEM PROPERTIES command modifies the item designated by the itemRef parameter within the list whose reference number is passed in list.

You can pass a reference number in itemRef. If there is no item with the item reference number that is passed, the command does nothing. You can optionally pass 0 in itemRef to modify the last item added to the list using APPEND TO LIST.

Lastly, you can pass * in itemRef: in this case, the command will apply to the current item of the list. If several items are selected manually, the current item is the one that was selected last. If no item is selected, the command does nothing.

If you work with item reference numbers, build a list in which items have unique reference numbers, otherwise you will not be able to distinguish the items. For more information, refer to the description of thecommand APPEND TO LIST.

Note: To change the text of the item or its sublist, use the command SET LIST ITEM.

To make an item enterable, pass TRUE in enterable; otherwise, pass FALSE.

Important: In order for an item to be enterable, it must belong to a list that is enterable. To make a whole list enterable, use the SET ENTERABLE command. To make an individual list item enterable, use SET LIST ITEM PROPERTIES. Changing the enterable property at the list level does not affect the enterable properties of the items. However, an item can be enterable only if its list is enterable.

You specify the font style of the item in the styles parameter. You pass a combination (one or a sum) of the following predefined constants:

ConstantTypeValue
PlainLong Integer0
BoldLong Integer1
ItalicLong Integer2
UnderlineLong Integer4
OutlineLong Integer8
ShadowLong Integer16
CondensedLong Integer32
ExtendedLong Integer64

Note: On Windows, only the styles Plain or a combination of Bold, Italic, and Underline are available. Moreover, the Condensed and Shadow styles are no longer supported and are kept only for compatibility reasons.

To associate an icon to the item, pass one of the following numeric values:

N, where N is the resource ID of Mac OS-based 'cicn' resource

Use PICT resource+N, where N is the the resource ID of a Mac OS-based 'PICT' resource

Use PicRef+N, where N is the reference number of a Picture from the Design environment Picture Library

Pass zero (0), if you do not want any graphic for the item.

Note: Use PICT resource and Use PicRef are predefined constants located in the Hierarchical Lists theme.

The color parameter (optional) lets you modify the color of the item text. The color must be specified in the form of an RGB color, i.e. a 4-byte longint in the 0x00RRGGBB format. For more information about this format, refer to the description of the SET RGB COLORS command. Pass -1 in the color parameter to reset the original color of the item.

Examples

1. See the example for the command APPEND TO LIST.

2. The following example changes the text of the current item of list to bold and bright red:

   SET LIST ITEM PROPERTIES(list;*;True;Bold;0;0x00FF0000)
   REDRAW LIST(list)

See Also

GET LIST ITEM PROPERTIES, SET LIST ITEM.


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