|
|
@@ -229,6 +229,7 @@ type
|
|
|
constructor Create(AOwner: TComponent); override;
|
|
|
destructor Destroy; override;
|
|
|
{ It loads the 'BitmapFile' }
|
|
|
+ procedure LoadFromBitmapResource(Resource: string; ResourceType: PChar);
|
|
|
procedure LoadFromBitmapFile;
|
|
|
procedure Assign(Source: TPersistent); override;
|
|
|
{ Streaming }
|
|
|
@@ -1148,6 +1149,19 @@ begin
|
|
|
inherited Destroy;
|
|
|
end;
|
|
|
|
|
|
+procedure TBCCustomImageButton.LoadFromBitmapResource(Resource: string; ResourceType: PChar);
|
|
|
+var
|
|
|
+ res: TResourceStream;
|
|
|
+begin
|
|
|
+ res := TResourceStream.Create(HInstance, Resource, ResourceType);
|
|
|
+
|
|
|
+ if BitmapOptions.Bitmap <> nil then
|
|
|
+ BitmapOptions.Bitmap.Free;
|
|
|
+
|
|
|
+ BitmapOptions.Bitmap := TBGRABitmap.Create(res);
|
|
|
+ res.Free;
|
|
|
+end;
|
|
|
+
|
|
|
procedure TBCCustomImageButton.LoadFromBitmapFile;
|
|
|
begin
|
|
|
if BitmapFile <> '' then
|