We have an Composite Control (Label or edit, two versions), which has added optional label and button. It worked nicely in Xe5, but now as we switched into D10 Seattle, Glyph of the button gets corrupted. (Or drawn wrongly)


We have an Composite Control (Label or edit, two versions), which has added optional label and button. It worked nicely in Xe5, but now as we switched into D10 Seattle, Glyph of the button gets corrupted. (Or drawn wrongly)

As you can see in image, Button with basically same code (except being standalone TSpeedButton descendant). Component with problems is inherited from TJvSpeedButton cut tried also the  TSpeedButton with same result.

Used Glyph is on right. 

Glyph gets initialized in the Constructor like : 

  LBitmap := TBitmap.Create;
  try
    LBitmap.LoadFromResourceName(hInstance,  cBoundButtonImageResourceName);
    Glyph := LBitmap;
  finally
    LBitmap.Free;
  end;

(Just as reading this I could Cache the Image, now it reads it every time components gets created, but that is completely separate thingy)

Comments