Access violation with PNG inside table.
Posted: Thu Dec 17, 2009 2:11 am
Delphi 2010, RVE 12.0.4, 5x5 table, TPNGObject (from PNGComponents adapted to D2010).
Inserting PNG picture into the table cell then pressing center alignment button raises Access Violation in RVERVData.pas here:
Inserting PNG picture into the table cell then pressing center alignment button raises Access Violation in RVERVData.pas here:
Code: Select all
function TRVEditRVData.GetCurItemNo: Integer;
{........................................}
function IndexOf(obj: TCustomRVItemInfo): Integer;
var ItemNo: Integer;
begin
Result := -1;
if (CaretDrawItemNo>=0) and (CaretDrawItemNo<DrawItems.Count) then begin
ItemNo := DrawItems[CaretDrawItemNo].ItemNo; <<<-----<<<-----[HERE]-----
if (ItemNo>=0) and (ItemNo<Items.Count) and (GetItem(ItemNo)=obj) then
Result := ItemNo;
end;
if Result<0 then
Result := Items.IndexOfObject(obj);
end;
{........................................}
begin
PrepareForEdit;
...