开发者

delphi non visual component image

开发者 https://www.devze.com 2023-01-08 20:00 出处:网络
I am building a delphi non-visual component. How do I set the image I wan开发者_运维知识库t it to have in the IDE?You must create a .dcr file with the name of your unit in the same directory of the .p

I am building a delphi non-visual component. How do I set the image I wan开发者_运维知识库t it to have in the IDE?


You must create a .dcr file with the name of your unit in the same directory of the .pas component source file. then add to the dcr file a 24x24 bitmap called with the name of the component class something like TMyNonVisualComp.

finally you must add this line to the unit {$R your_dcr_file.DCR}

Check theses links for more info

  • Delphi 7 for Windows Component Writer's Guide
  • Design Time Icons (Toolbar Buttons)
  • Delphi Component Building
  • Building Your First Component


You just need to make icon for this component that will also be shown in component palette, same way you are doing this for visual components. In short words, make MyComponent.dcr file for component MyComponent.pas and add this file to package with this component. You can use Delphi Image Editor to make dcr.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号