Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>



Adding metafiles as block on the toolbar
procedure TForm1.atDiagram1InsertDControl(Sender: TObject; ADControl: TDiagramControl); begin if UpperCase(ADControl.DControlID) = 'MYBLOCK' then begin With ADControl As TDiagramBlock do begin Shape := bsNoShape; Metafile.LoadFromFile('C:\MyMetafile.wmf'); end; end else if UpperCase(ADControl.DControlID) = 'MYOTHERBLOCK' then begin With ADControl As TDiagramBlock do begin Color := clYellow; end; end; end; initialization RegisterDControl(TDiagramBlock, 'MyBlock', 'This is a caption for my block', 'My category'); RegisterDControl(TDiagramBlock, 'MyOtherBlock', 'This is a caption for my other block', 'My category');
atDiagram1.GraphicLib := dglGdiPlus;