Jump to content

Recommended Posts

Posted

Farshad, in a application compiled with 0.84, I used to hide some labels (TUniLabel) using this code:

 

procedure MakeVisible(Visible: Boolean; Controls: array of TControl);
var
 C: TControl;
begin
 for C in Controls do C.Visible := Visible;
end;

begin
 MakeVisible(False, [lbl1, lbl2, lbl3, lbl4]);
end;

 

This code don't work anymore in 0.85.0 build 868 (desktop and web).

 

I have changed this to:

 

procedure MakeVisible(Visible: Boolean; Labels: array of TUniLabel);
var
 L: TUniLabel;
begin
 for L in Labels do L.Visible := Visible;
end;

 

And now it works in web and desktop. Have you changed the object hierarchy?

  • Administrators
Posted

Yes, internal structure has changed a lot. All controls are descendants of TUniControl.

 

procedure MakeVisible(Visible: Boolean; Labels: array of TUniControl);
var
 L: TUniControl;
begin
 for L in Labels do L.Visible := Visible;
end;

×
×
  • Create New...