How to hide a component at runtime?

Using IntraWeb 14.1 and Delphi Berlin, I create and raise a frame inside IWRegionas follows:

 Page := TFrame.Create(Self);
 Page.Parent := UserSession.Body_Region;

where it UserSession.Body_Region;decreases as Body_Region: TIWRegion;in UserSessionUnitto transfer this area from form to form at runtime, and everything works fine.

The problem is that I want to hide the frame loaded internally UserSession.Body_Regionat runtime, which UserSession.Main_Body_Region.Component[0];, but I could not do it.

I tried it with

(UserSession.Main_Body_Region.Component[0] as TFrame).hide;

or

(UserSession.Main_Body_Region.Component[0] as TFrame).Visible:= false;

but it does not work! also no errors!

Is there any other way to do this or am I missing something here?

+4
source share
1 answer

Although the documentation says that

TIWRegion - IntraWeb TPanel VCL.

, :

property RenderInvisibleControls: Boolean; TIWBaseContainer

, , , Visible = False , , . , Async.

IOW, False, Visible = False .

+5

Source: https://habr.com/ru/post/1686648/


All Articles