RxFPC:implemented images for TRxColumnEditButton.Style - thx RusDeveloper

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4644 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2016-05-11 12:44:15 +00:00
parent 98ee797040
commit 3202b2f161
18 changed files with 398 additions and 235 deletions

View File

@ -62,6 +62,7 @@ procedure OutTextXY90(Canvas:TCanvas; X,Y:integer; Text:string; Orientation:TTex
function IsForegroundTask: Boolean;
function ValidParentForm(Control: TControl): TCustomForm;
function CreateArrowBitmap:TBitmap;
function CreateResBitmap(const AResName:string):TBitmap;
function LoadLazResBitmapImage(const ResName: string): TBitmap;
{functions from DBGrid}
@ -604,11 +605,10 @@ end;
{$ENDIF}
function CreateArrowBitmap:TBitmap;
var
C : TCustomBitmap;
begin
{$IFNDEF RX_USE_LAZARUS_RESOURCE}
Result := TBitmap.Create;
Result:=CreateResBitmap('rxbtn_downarrow');
(* Result := TBitmap.Create;
try
try
C := TPortableNetworkGraphic.Create;
@ -620,12 +620,31 @@ begin
except
Result.Free;
raise;
end;
end; *)
{$ELSE}
Result:=LoadLazResBitmapImage('rxbtn_downarrow')
{$ENDIF}
end;
function CreateResBitmap(const AResName: string): TBitmap;
var
C : TCustomBitmap;
begin
Result := TBitmap.Create;
try
try
C := TPortableNetworkGraphic.Create;
C.LoadFromResourceName(hInstance, AResName);
Result.Assign(C);
finally
C.Free;
end;
except
Result.Free;
raise;
end;
end;
//Code from DBGrid
function LoadLazResBitmapImage(const ResName: string): TBitmap;
var