MMpy.FileStruct.set_field_width
Syntax
structure.set_field_width(field_id, field_width)
Description
Sets the width of the selected field.
Parameters
Name |
Type |
Description |
---|---|---|
field_id |
int | ID of the field. |
field_width | int | Width to assign to the field. |
See Also
MMpy.FileStruct.get_field_width()
Notes
Be careful when using this function, as it can result in data loss. The user must ensure that the data is copied somewhere else beforehand, or that the new width is larger than or equal to the old width.
Examples
file = MMpy.File() file.open(...) structure = file.structure struct.set_field_width(0, 10) file.structure = struct file.close()
Resource ID
IDPH_FILESTRUCT_SETFLDWIDTH