* Fixed compilation and some memleaks

git-svn-id: trunk@14954 -
This commit is contained in:
marc 2008-04-24 23:48:27 +00:00
parent c82d2dcc96
commit aecb127993
2 changed files with 10 additions and 22 deletions

View File

@ -93,7 +93,6 @@ type
PaintBox1 : TPaintBox;
Panel1 : TPanel;
PixMap1 : TPixMap;
png : TPortableNetworkGraphic;
PopupMenu1 : TPopupMenu;
Hello : TMenuItem;
Doctor : TMenuItem;
@ -915,9 +914,7 @@ Bevel1 := TBevel.Create(Self);
Width := 100;
end;
//++++++++++++++++++++++++++++++++++ TBitBtn1 +++++++++++++++++++++++++++++++++++++++
png := TPortableNetworkGraphic.Create;
png.LoadFromLazarusResource('topendialog');
BitBtn1 := TBitBtn.Create(Self);
With BitBtn1 do
begin
@ -953,7 +950,7 @@ BitBtn1 := TBitBtn.Create(Self);
Font.Pitch := fpDefault;
Font.Size := 10;
Font.Style := BitBtn1.Font.Style+[fsBold];
Glyph := png;
Glyph.LoadFromLazarusResource('topendialog');
//height := 28; Has to be set before Glyph
//HelpContext := 0; Identifier not found
Hint := 'Settings for BitBtn1 >>';
@ -2237,9 +2234,6 @@ ScrollBar1 := TScrollBar.Create(Self);
Visible := True;
end;}
//++++++++++++++++++++++++++++++++++++ SpeedButton1..4 ++++++++++++++++++++++++++++++
png := TPortableNetworkGraphic.Create;
png.LoadFromLazarusResource('open');
SpeedButton1 := TSpeedButton.Create(Self);
With SpeedButton1 do
begin
@ -2256,12 +2250,10 @@ SpeedButton1 := TSpeedButton.Create(Self);
Hint := 'SpeedButton1';
Color := clBtnFace;
ShowHint := True;
Glyph := png;
Glyph.LoadFromLazarusResource('open');
Visible := True;
end;
png := TPortableNetworkGraphic.Create;
png.LoadFromLazarusResource('menu_save');
SpeedButton2 := TSpeedButton.Create(Self);
With SpeedButton2 do
@ -2277,14 +2269,11 @@ SpeedButton2 := TSpeedButton.Create(Self);
Hint := 'SpeedButton1';
Color := clBtnFace;
ShowHint := True;
Glyph := png;
Glyph.LoadFromLazarusResource('menu_save');
Enabled := True;
Visible := True;
end;
png := TPortableNetworkGraphic.Create;
png.LoadFromLazarusResource('item_font');
SpeedButton3 := TSpeedButton.Create(Self);
With SpeedButton3 do
begin
@ -2299,14 +2288,11 @@ SpeedButton3 := TSpeedButton.Create(Self);
Hint := 'SpeedButton1';
Color := clBtnFace;
ShowHint := True;
Glyph := png;
Glyph.LoadFromLazarusResource('item_font');
Enabled := True;
Visible := True;
end;
png := TPortableNetworkGraphic.Create;
png.LoadFromLazarusResource('tcolordialog');
SpeedButton4 := TSpeedButton.Create(Self);
With SpeedButton4 do
begin
@ -2321,7 +2307,7 @@ SpeedButton4 := TSpeedButton.Create(Self);
Hint := 'SpeedButton4';
Color := clBtnFace;
ShowHint := True;
Glyph:=png;
Glyph.LoadFromLazarusResource('tcolordialog');
Enabled := True;
Visible := True;
end;

View File

@ -1427,11 +1427,12 @@ begin
Hint := FileN [i] + '(normal buton)';
end;
Color := clBtnFace;
Glyph := Pixmap1;
Glyph.Assign(Pixmap1);
Enabled := True;
Visible := True;
ShowHint := true;
end;
FreeAndNil(Pixmap1);
end;
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@ -1784,7 +1785,8 @@ begin
finally
S.Free;
end;
BitBtn1.Glyph := PixMap1;
BitBtn1.Glyph.Assign(PixMap1);
FreeAndNil(PixMap1);
end;
lbEvents.Items.Add('<<< WORKS WITH STREAM.PIXMAPS >>>');