addEnumProperty

addEnumProperty(t, id, location, name, desc, defaultVal, choicesString)

Declare a property with id id, to be inserted in the dialog box before the element described by location. The property is labeled with name and will be initialized with the choice that has the defaultVal . The description string desc is used to show help for this property.

The user can choose one of the choices listed in choicesString. Different choices are separated by a carriage return character. Each choice is described by three fields separated by a bar. The first field is the choiceId, the second is a human readable description, and the third is a help string that is shown in the help area.

Example

def onShowProps(t):
     ide.addEnumProperty(t,"x.erase.type", "*|programoptions|programoptions.eraseb4program","Chip erase type", "Select memories to erase", "ChipEraseAll", 
            "ChipEraseAll|All Memories + NVM configuration rows (ChipErase_ALL)|Description for ChipErase_All\n"
            "ChipEraseS|All Memories excluding BOOT region (ChipErase_S)|Description for ChipErase_S\n"
            "ChipEraseNS|All Non Secure Memory Regions excludng BOOT region(ChipErase_NS)|Description for ChipErase_NS")