title: TButton and TBitBtn, inheritance and ImageList support
body: <p>The below question discusses how inheritance chain between TButton and TBitBtn has changed, namely the introduction of a common ancestor, TCustomButton.</p>
  <p><a href="https://stackoverflow.com/questions/946316/what-happened-to-tbitbtn-and-tbutton-inheritance-chain">What happened to TBitBtn and TButton inheritance chain?</a></p>
  <p>In the past, those who wanted graphics on their button would opt for a TBitBtn, as it offered usage of bitmap glyphs.</p>
  <p>In more recent versions of Delphi, the standard TButton allows to specify a TImageList, for png / jpg support, while TBitBtn does not.</p>
  <p>My (long-time) button subclass inherits from TBitBtn, and changing that would mean a potential application-wide button redesign. No time for that. I want the ability to migrate things over time, in baby steps, without deleting and re-creating buttons (chance to miss the migration of a property or an event). Optimally, pick a button, wipe its glyph, put a png in its imagelist, over.</p>
  <p>Looking at the sources of VCL.Buttons and VCL.StdCtrls, the bulk of the work for ImageList, ImageIndex ... is done at the common ancestor, TCustomButton. TButton only publishes those properties to be used at design-time.</p>
  <p>Great, I can simply make my TBitBtn subclass publish those same properties. The properties are now visible in the object inspector. I can select an imagelist component, even pick an image index from the available images.</p>
  <p>And this is where things stop working: the selected image doesn't get displayed at design-time, nor at runtime. Assign a glyph, it gets displayed without any problems. I tried looking at other properties which may interfere in the painting of the png (maybe some kind of transparency option), in vain.</p>
  <p>EDIT:</p>
  <p>This link mentions that TBitBtn purposely disables the usage of ImageList in favor of its own drawing:</p>
  <p><a href="http://codeverge.com/embarcadero.delphi.graphics/tbitbtn-with-png-on-d2009/1077124" rel="nofollow noreferrer">http://codeverge.com/embarcadero.delphi.graphics/tbitbtn-with-png-on-d2009/1077124</a></p>
  <p>Nonetheless, any suggestions on how I can achieve my &quot;baby steps&quot; migration described above from bmp icons to png ones, as smoothly as possible?</p>
  <p>Version info: 10.3.1</p>
  <p>Thanks!</p>