mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-08 12:58:25 +02:00
Examples: ResExplorer: clear contents of the pagecontrol if there is nothing to be shown or when opening another file.
git-svn-id: trunk@49560 -
This commit is contained in:
parent
a931d80679
commit
d5a1ca25e1
@ -3,7 +3,6 @@ object reMainForm: TreMainForm
|
|||||||
Height = 605
|
Height = 605
|
||||||
Top = 242
|
Top = 242
|
||||||
Width = 768
|
Width = 768
|
||||||
ActiveControl = StringGrid1
|
|
||||||
Caption = 'reMainForm'
|
Caption = 'reMainForm'
|
||||||
ClientHeight = 585
|
ClientHeight = 585
|
||||||
ClientWidth = 768
|
ClientWidth = 768
|
||||||
@ -57,11 +56,11 @@ object reMainForm: TreMainForm
|
|||||||
end
|
end
|
||||||
object tabImage: TTabSheet
|
object tabImage: TTabSheet
|
||||||
Caption = 'Image'
|
Caption = 'Image'
|
||||||
ClientHeight = 480
|
ClientHeight = 478
|
||||||
ClientWidth = 469
|
ClientWidth = 467
|
||||||
object Image1: TImage
|
object Image1: TImage
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 477
|
Height = 478
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 467
|
Width = 467
|
||||||
Align = alClient
|
Align = alClient
|
||||||
|
@ -52,6 +52,7 @@ type
|
|||||||
procedure TreeView1Click(Sender: TObject);
|
procedure TreeView1Click(Sender: TObject);
|
||||||
private
|
private
|
||||||
Res:TResources;
|
Res:TResources;
|
||||||
|
procedure ClearDisplay;
|
||||||
procedure LoadVersionResource(V:TVersionResource);
|
procedure LoadVersionResource(V:TVersionResource);
|
||||||
procedure LoadBitmapResource(B:TBitmapResource);
|
procedure LoadBitmapResource(B:TBitmapResource);
|
||||||
procedure LoadGroupIconResource(G:TGroupIconResource);
|
procedure LoadGroupIconResource(G:TGroupIconResource);
|
||||||
@ -135,6 +136,7 @@ var
|
|||||||
begin
|
begin
|
||||||
if Assigned(TreeView1.Selected) and Assigned(TreeView1.Selected.Data) then
|
if Assigned(TreeView1.Selected) and Assigned(TreeView1.Selected.Data) then
|
||||||
begin
|
begin
|
||||||
|
ClearDisplay;
|
||||||
ResItem:=TAbstractResource(TreeView1.Selected.Data);
|
ResItem:=TAbstractResource(TreeView1.Selected.Data);
|
||||||
HeaderControl1.Sections[1].Text:=ResItem.ClassName + ' : ' + ResItem.Name.Name;
|
HeaderControl1.Sections[1].Text:=ResItem.ClassName + ' : ' + ResItem.Name.Name;
|
||||||
if ResItem is TVersionResource then
|
if ResItem is TVersionResource then
|
||||||
@ -150,6 +152,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TreMainForm.ClearDisplay;
|
||||||
|
begin
|
||||||
|
StringGrid1.Clean;
|
||||||
|
Image1.Picture.Clear;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TreMainForm.LoadVersionResource(V: TVersionResource);
|
procedure TreMainForm.LoadVersionResource(V: TVersionResource);
|
||||||
var
|
var
|
||||||
i,j, k:integer;
|
i,j, k:integer;
|
||||||
@ -205,6 +213,7 @@ begin
|
|||||||
Reader:=TElfResourceReader.Create;
|
Reader:=TElfResourceReader.Create;
|
||||||
|
|
||||||
TreeView1.Items.Clear;
|
TreeView1.Items.Clear;
|
||||||
|
ClearDisplay;
|
||||||
if Assigned(Res) then
|
if Assigned(Res) then
|
||||||
FreeAndNil(Res);
|
FreeAndNil(Res);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user