diff --git a/components/rx/docs/WhatsNew.eng.txt b/components/rx/docs/WhatsNew.eng.txt index 99b3bd106..6ba56552d 100644 --- a/components/rx/docs/WhatsNew.eng.txt +++ b/components/rx/docs/WhatsNew.eng.txt @@ -1,3 +1,4 @@ + + fix create resource from XPM image + draw shadow on button image in TToolPanel - Fix error in TDBComboBox.EditingDone if DataSet = nil 22.05.2008 - version 2.0.0.136 (svn revision 100) diff --git a/components/rx/docs/WhatsNew.rus.txt b/components/rx/docs/WhatsNew.rus.txt index a175a8f0c..7f3bd67fb 100644 --- a/components/rx/docs/WhatsNew.rus.txt +++ b/components/rx/docs/WhatsNew.rus.txt @@ -1,3 +1,4 @@ + + Исправлено создание ресурсов из XPM файлов + Доработана отрисовка тени у кнопки на TToolPanel - Исправлена ошибка в TDBComboBox.EditingDone; если не присвоен DataSet 22.05.2008 - версия 2.0.0.136 (svn revision 100) diff --git a/components/rx/rxdbgrid.pas b/components/rx/rxdbgrid.pas index 2cb0767dc..8b54c3e94 100644 --- a/components/rx/rxdbgrid.pas +++ b/components/rx/rxdbgrid.pas @@ -1890,10 +1890,12 @@ begin Options:=Options - [dgCancelOnExit]; {$ENDIF} - FMarkerUp := TBitmap.Create; + FMarkerUp := LoadLazResBitmapImage('rx_markerup'); + FMarkerDown := LoadLazResBitmapImage('rx_markerdown'); +{ FMarkerUp := TBitmap.Create; FMarkerUp.LoadFromLazarusResource('rx_markerup'); FMarkerDown := TBitmap.Create; - FMarkerDown.LoadFromLazarusResource('rx_markerdown'); + FMarkerDown.LoadFromLazarusResource('rx_markerdown');} FPropertyStorageLink:=TPropertyStorageLink.Create; FPropertyStorageLink.OnSave:=@OnIniSave; diff --git a/components/rx/vclutils.pas b/components/rx/vclutils.pas index cadfa494d..edeacc17f 100644 --- a/components/rx/vclutils.pas +++ b/components/rx/vclutils.pas @@ -29,6 +29,8 @@ procedure OutTextXY90(Canvas:TCanvas; X,Y:integer; Text:string; Orientation:TTex function IsForegroundTask: Boolean; function ValidParentForm(Control: TControl): TCustomForm; function CreateArrowBitmap:TBitmap; +function LoadLazResBitmapImage(const ResName: string): TBitmap; + { function AllocMemo(Size: Longint): Pointer; function ReallocMemo(fpBlock: Pointer; Size: Longint): Pointer; @@ -512,8 +514,25 @@ end; function CreateArrowBitmap:TBitmap; begin - Result:=Graphics.TBitmap.Create; - Result.LoadFromLazarusResource('rxbtn_downarrow'); + Result:=LoadLazResBitmapImage('rxbtn_downarrow') +{ Result:=Graphics.TBitmap.Create; + Result.LoadFromLazarusResource('rxbtn_downarrow');} +end; + +//Code from DBGrid +function LoadLazResBitmapImage(const ResName: string): TBitmap; +var + C: TCustomBitmap; +begin + C := CreateBitmapFromLazarusResource(ResName); + if C<>nil then + begin + Result := TBitmap.Create; + Result.Assign(C); + C.Free; + end + else + Result:=nil; end; initialization