MapWinGIS:Shapefile EditDeleteField
From MapWindow GIS
EditDeleteField
Deletes a field from the attribute table. Note: The attribute table must be in editing mode to delete fields.
VB.NET Usage
Function EditDeleteFields(FieldIndex As Integer, cBack As MapWinGIS.ICallBack) As Boolean
Parameters
|
FieldIndex | The index of the field to be deleted. |
| cBack | The ICallback object which will receive the progress and error messages while the field is being deleted. |
| ReturnValue | A boolean value representing the success or failure of deleting the field in the attribute table. |
Sample Code
Private Sub EditDeleteField()
Dim sf As New MapWinGIS.Shapefile()
'Switch the shapefile attribute table into editing mode
sf.StartEditingTable()
'Delete field 0 in the shapefile attribute table
sf.EditDeleteField(0)
End Sub
VB 6 Usage
Function EditDeleteFields(FieldIndex As Long, cBack As ICallBack) As Boolean
Parameters
|
FieldIndex | The index of the field to be deleted. |
| cBack | The ICallback object which will receive the progress and error messages while the field is being deleted. |
| ReturnValue | A boolean value representing the success or failure of deleting the field in the attribute table. |
Sample Code
Private Sub EditDeleteField()
Dim sf As New MapWinGIS.Shapefile
'Switch the shapefile attribute table into editing mode
sf.StartEditingTable
'Delete field 0 in the shapefile attribute table
sf.EditDeleteField (0)
End Sub
















