Deletes a field.
// Delphi public procedure DeleteField( const _name : String ); virtual;
// C++ Builder public: virtual void DeleteField( const UnicodeString _name );
|_name||String||name of field to be deleted|
Use this method to delete a field, which will be marked as deleted and final restructure will be performed upon save.
Undelete can be performed by RevertAll.
Internally it uses FieldInfo method with _name param.
This is a simple procedure to manipulate fields.
procedure MyClass.SaveInfo( const _shp : TGIS_Shape ) ; var CurrentName : String; begin // Read the current fieldname of the first field and // rename the field to a name determined by the user. CurrentName := _shp.Layer.FieldInfo(0)^.NewName; _shp.Layer.RenameField(CurrentName, edtInfoField.Text, 256, 0); // Make the value from the "edtInfoValue" editbox to // be the value of the field. _shp.SetField(edtInfoField.Text, edtInfoValue.Text); // delete the field, just like that _shp.Layer.DeleteField(CurrentName); end;