Tool example for Delphi
//This sample displays the current tool, and then changes it to ANN_TOOL_RECT
procedure TForm1.ToolClick(Sender: TObject);
var
strTool: String;
begin
Case (RasterAnnToolbar.Tool) of
ANN_TOOL_SELECT:
strTool:= 'Select';
ANN_TOOL_LINE:
strTool := 'Line';
ANN_TOOL_RECT:
strTool := 'Rect';
ANN_TOOL_ELLIPSE:
strTool := 'Ellipse';
ANN_TOOL_POLYLINE:
strTool := 'Polyline';
ANN_TOOL_POLYGON:
strTool := 'Polygon';
ANN_TOOL_POINTER:
strTool := 'Pointer';
ANN_TOOL_FREEHAND:
strTool := 'Freehand';
ANN_TOOL_HILITE:
strTool := 'hilite';
//...other tools
end;
ShowMessage ('Current tool: ' + strTool);
ShowMessage ('Changing to ANN_TOOL_RECT');
RasterAnnToolbar.Tool:= ANN_TOOL_RECT;
end;