Attaching visual icons to newly diagramblocks added!

Hello every one
When I add a new diagramBlock and registe it to the Buttons Panel I still need to attach an icon to this component! May you suggest something to do that. Thanks In Advanve

To add images to registered blocks and lines, you have several options:

  1. Add a BITMAP resource to your application of size 24x24 and the resource name must be your block id preceded by “blk_”. For example, if your block id is “TMyBlock”, then the resource name must be “BLK_TMYBLOCK”.

  2. Set the Glyph property (of type TPicture) of the registered control:


and set UseGlyph to true:

RegDControlList.FindByID(’TMyBlock’).UseGlyph := True;	
  1. If you use TDiagramToolbar, use TDiagramToolbar.OnGetImageIndex event, to provide an index of the image in the associated ImageList object of TDiagramToolBar.

Thank you.
Iam realy glad to a have someone to assist me with this valuable softeware.

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.