0

Is it possible to get access to the component icons that are used in the IDE, but at runtime?

I understand the icons are compiled as a binary resource into the package during component development, and the IDE can access them to show, e.g. on the component palette. But I'm not very familiar with binary resources and the functionalities (RCDATA, bitmap, etc..).

Can you do the same from you own application (and what would you need to deploy or register to achieve this?), e.g. get the component icon of FMX's TEdit?

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
DDeberla
  • 77
  • 5
  • @KenWhite it is common for simple components that don't require design-time editors to implement their run-time and design-time logic into a single package. Not everyone separates design-time registrations into designtime-only packages (though they generally should). – Remy Lebeau May 04 '20 at 23:40
  • @RemyLebeau: You can't register a component on the palette without using design-time support, which can't be used in a runtime package AFAIK. It's been that way for years now. If there's no component palette registration, there's no icon for the component. – Ken White May 05 '20 at 00:00
  • @KenWhite Yes, it can, because [`RegisterComponents()`](http://docwiki.embarcadero.com/Libraries/en/System.Classes.RegisterComponents) (and several other `Register...()` functions) are in the `Sytem.Classes` unit, which is in the RTL's runtime package. That is why I mention that "simple" components (ie, w/ no design-time editors) can use a single package that is marked for both run-time and design-time usage, as long as it doesn't need to use any design-time units/packages, such as `designide`. – Remy Lebeau May 05 '20 at 00:09
  • @RemyLebeau: You're right. My mistake. I've been in home confinement too long. – Ken White May 05 '20 at 00:10

0 Answers0