about box, status was only auto refresh on create

This commit is contained in:
Basile Burg 2015-08-31 17:56:25 +02:00
parent be20059d6b
commit e72f558ff1
2 changed files with 28 additions and 4 deletions

View File

@ -25,12 +25,12 @@ inherited CEInfoWidget: TCEInfoWidget
Align = alTop
BorderSpacing.Around = 4
Caption = 'about'
ClientHeight = 75
ClientHeight = 85
ClientWidth = 366
TabOrder = 0
object Label1: TLabel
Left = 0
Height = 75
Height = 85
Top = 0
Width = 366
Align = alClient
@ -52,12 +52,12 @@ inherited CEInfoWidget: TCEInfoWidget
Align = alClient
BorderSpacing.Around = 4
Caption = 'tools status'
ClientHeight = 159
ClientHeight = 169
ClientWidth = 366
TabOrder = 1
object boxTools: TScrollBox
Left = 4
Height = 151
Height = 161
Top = 4
Width = 358
HorzScrollBar.Page = 1

View File

@ -37,6 +37,9 @@ type
GroupBox2: TGroupBox;
Label1: TLabel;
private
procedure RefreshAllStatus;
protected
procedure SetVisible(Value: Boolean); override;
public
constructor create(aOwner: TComponent); override;
end;
@ -147,6 +150,8 @@ begin
fIco.Glyph.Assign(png);
png.Free;
end;
ReAlign;
Invalidate;
end;
constructor TCEInfoWidget.create(aOwner: TComponent);
@ -176,5 +181,24 @@ begin
Realign;
end;
procedure TCEInfoWidget.RefreshAllStatus;
var
i: integer;
begin
for i := 0 to boxTools.ControlCount -1 do
begin
if not (boxTools.Controls[i] is TToolInfo) then
continue;
TToolInfo(boxTools.Controls[i]).refreshStatus;
end;
end;
procedure TCEInfoWidget.SetVisible(Value: Boolean);
begin
inherited;
if Visible then
RefreshAllStatus;
end;
end.