Recent

Author Topic: Component icons  (Read 2609 times)

jonneve

  • New Member
  • *
  • Posts: 11
    • CopyCat Replication Engine
Component icons
« on: March 31, 2015, 10:31:04 am »
Hi, 

How do I go about adding component icons to my components, to use at design time?

Thanks,
Jonathan

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Component icons
« Reply #1 on: March 31, 2015, 10:44:12 am »
Are you asking how to have your component display an icon as well as text at runtime, or are you asking how to have your component display an icon other than the default icon in the IDE component palette when registered and installed ... or asking something else?

jonneve

  • New Member
  • *
  • Posts: 11
    • CopyCat Replication Engine
Re: Component icons
« Reply #2 on: March 31, 2015, 10:53:06 am »
The latter. I'm new to Lazarus and I'm porting my components over from Delphi, and I've got them to install but they just have the default icons at design time.

zeljko

  • Hero Member
  • *****
  • Posts: 1959
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Component icons
« Reply #3 on: March 31, 2015, 11:13:50 am »
You must create resource file, and icons must be in order you register your components.

jonneve

  • New Member
  • *
  • Posts: 11
    • CopyCat Replication Engine
Re: Component icons
« Reply #4 on: March 31, 2015, 12:03:40 pm »
Same as in Deplhi? I have a resource file that works in Delphi, how do I declare it for Lazarus?

zeljko

  • Hero Member
  • *****
  • Posts: 1959
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Component icons
« Reply #5 on: March 31, 2015, 01:30:03 pm »
Look eg in components/lazcontrols/lazcontrols.pas ....

 

TinyPortal © 2005-2018