Fixed loading icons from Laurent Jacques

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@187 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
tomb0
2007-06-23 14:08:08 +00:00
parent c3e6d4b260
commit a83a09e9c3

View File

@ -242,15 +242,24 @@ begin
begin begin
Icon := TIcon.Create; Icon := TIcon.Create;
try try
// First image in std bitmap
Icon.LoadFromFile(FileName); Icon.LoadFromFile(FileName);
for I := 0 to Pred(Icon.Bitmaps.Count) do NewPage := CreatePage(Icon as TBitmap);
begin NewPage.Parent := Self;
NewPage := CreatePage(Icon.Bitmaps[I] as TBitmap); ActivePage := NewPage;
NewPage.Parent := Self; NewPage.Caption := FindNewUniqueName;
ActivePage := NewPage; Change;
NewPage.Caption := FindNewUniqueName;
Change; // other image in Bimaps if assigned
end; if Icon.Bitmaps <> nil then
for I := 0 to Pred(Icon.Bitmaps.Count) do
begin
NewPage := CreatePage(Icon.Bitmaps[I] as TBitmap);
NewPage.Parent := Self;
ActivePage := NewPage;
NewPage.Caption := FindNewUniqueName;
Change;
end;
finally finally
Icon.Free; Icon.Free;
end; end;
@ -387,3 +396,4 @@ end;
end. end.