Navigation:  Reference > Commands >

Combo Box Items

Print this Topic Previous pageReturn to chapter overviewNext page

 

Use this command to add or clear the item string list in a TTASComboBox or a TTASDataGrid column (ComboItems).

 

COMBO_ITEM

 

NAME f/c/eRequired - The name of the object.  If you are updating a column in a data grid this would be the name of the data grid column.  You can also update a data grid column template.  In that case this would be the name of the TTASDGColTemplate object.

 

GRID f/c/eIf you are updating a data grid column this is the name of the TTASDataGrid object.

 

what-to-doADD - Add a new item to the string list.  The value to add must immediately follow this option.

       CLR - Clear all the strings that are currently in the item list specified.

 

f/c/eIf the option above is ADD this is the value you will add to the item list.        

 

COMMENTS

You can also update the combo box items by using the STRINGS() function.

 

       Example

COMBO_ITEM ADD CLR GRID f/c/e NAME f/c/e        

Example 2

The example below shows code on how to read data into the combo box  using a scan and the combo_item command.

 

umcomp.pre:   //load the dropdown

    COMBO_ITEM CLR NAME 'umcomp'

      SCAN @um_hndl KEY UM.TYPE START MAT.UM.TYPE WHILE UM.TYPE = MAT.UM.TYPE

        COMBO_ITEM ADD UM.NAME NAME 'umcomp'

    ends

      //This forces the dropdown to dropdown whne the user enter the combo box it has to be after the //COMBO_ITEM command you cound also trap this if you needed to like with trap F2 gosub dropdown2

      set_object 'umcomp' property 'dropdown' value true

      ret

 

dropdown2:

      set_object 'umcomp' property 'dropdown' value true

   ret

 

 

 


Page url: http://www.cassoftware.com/tas/manual/comboboxitems.htm