User Tools

Site Tools


api:dk11:delphi:giseditor.tgis_editor.deleteshape_void

Table of Contents

TGIS_Editor.DeleteShape method

DK11 for Delphi | GisEditor.TGIS_Editor.DeleteShape | Constructors | Methods | Properties | Events

Delete currently edited shape and end editing.

Available also on: .NET | Java | ActiveX.

Syntax

Implements IGIS_Editor.DeleteShape.

// Delphi
public
  procedure DeleteShape;
// C++ Builder
public:
  void DeleteShape(void);

Example

Delphi

procedure MyClass.GISKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if Key = VK_CONTROL then
    if not vkControl then begin // avoid multiple call on key repeat ;
      // let's revert an edited shape
      GIS.Editor.RevertShape ;
      GIS.Mode := TGIS_ViewerMode.Select ;
      vkControl := True ;
    end ;
 
  if Key = VK_DELETE then
    // if we are in edit mode
    if GIS.Mode = TGIS_ViewerMode.Edit then begin
    // let's delete edited shape
    GIS.Editor.DeleteShape ;
    GIS.Mode := TGIS_ViewerMode.Select ;
  end ;
end;

References

2020/05/07 01:07

Page Tools