diff --git a/examples/lazresexplorer/remainunit.lfm b/examples/lazresexplorer/remainunit.lfm index 54981a8211..f37d037cd5 100644 --- a/examples/lazresexplorer/remainunit.lfm +++ b/examples/lazresexplorer/remainunit.lfm @@ -3,7 +3,6 @@ object reMainForm: TreMainForm Height = 605 Top = 242 Width = 768 - ActiveControl = StringGrid1 Caption = 'reMainForm' ClientHeight = 585 ClientWidth = 768 @@ -57,11 +56,11 @@ object reMainForm: TreMainForm end object tabImage: TTabSheet Caption = 'Image' - ClientHeight = 480 - ClientWidth = 469 + ClientHeight = 478 + ClientWidth = 467 object Image1: TImage Left = 0 - Height = 477 + Height = 478 Top = 0 Width = 467 Align = alClient diff --git a/examples/lazresexplorer/remainunit.pas b/examples/lazresexplorer/remainunit.pas index 5f60b44469..63fbb78b2a 100644 --- a/examples/lazresexplorer/remainunit.pas +++ b/examples/lazresexplorer/remainunit.pas @@ -52,6 +52,7 @@ type procedure TreeView1Click(Sender: TObject); private Res:TResources; + procedure ClearDisplay; procedure LoadVersionResource(V:TVersionResource); procedure LoadBitmapResource(B:TBitmapResource); procedure LoadGroupIconResource(G:TGroupIconResource); @@ -135,6 +136,7 @@ var begin if Assigned(TreeView1.Selected) and Assigned(TreeView1.Selected.Data) then begin + ClearDisplay; ResItem:=TAbstractResource(TreeView1.Selected.Data); HeaderControl1.Sections[1].Text:=ResItem.ClassName + ' : ' + ResItem.Name.Name; if ResItem is TVersionResource then @@ -150,6 +152,12 @@ begin end; end; +procedure TreMainForm.ClearDisplay; +begin + StringGrid1.Clean; + Image1.Picture.Clear; +end; + procedure TreMainForm.LoadVersionResource(V: TVersionResource); var i,j, k:integer; @@ -205,6 +213,7 @@ begin Reader:=TElfResourceReader.Create; TreeView1.Items.Clear; + ClearDisplay; if Assigned(Res) then FreeAndNil(Res);