Language Reference Guide : 4. System Classes : ChoiceList Class : AddItem Method
 
Share this page                  
AddItem Method
The AddItem method adds either a ChoiceItem or a ChoiceBitmap to the end of the ChoiceItems array.
This method has the following syntax:
integer = ChoiceList.AddItem (enumvalue = Integer,
          textvalue = nvarchar, displayvalue = nvarchar
          bitmapvalue = BitmapObject)
This method has the following parameters:
enumvalue
Specifies the integer value to insert into the EnumValue column
textvalue
Specifies the associated text to insert into the EnumText column
displayvalue
Specifies the display text to insert into the EnumDisplay column
bitmapvalue
Specifies the associated bitmap image to insert into the EnumBitmap column.
If the bitmapvalue parameter is not null, a ChoiceBitmap object is created. Otherwise, a ChoiceItem is created.
The AddItem method returns the sequence number of the new row in the array.
You can also use the standard array methods for adding row to the ChoiceItems array. For information about adding a bitmap image to a palette field, see the Programming Guide.