Jump to content

Dock and Align layout and ScreenMask


arilotta

Recommended Posts

Hi all,

I'm trying to show the screen mask on a form with the Dock and Align layout. It seems that the screen mask covers just

the panel aligned to Client (alClient).

To reproduce just add the following event to the UniPanelClient panel (UniPanel2) on the Dock&Align demo:

 

procedure TMainForm.UniPanel2Click(Sender: TObject);
begin
  self.ShowMask('test');
end;
 
Is there a workaround ?
 
Thanks
Andrea

 

 

Link to comment
Share on other sites

Hi,

 

As a workaround, maybe you need to use this approach for now, for example:

procedure TMainForm.UniPanel2Click(Sender: TObject);
begin
  //self.ShowMask('test');
  UniSession.AddJS('MainForm.form.mask("Test")');
end;

Best regards,

Link to comment
Share on other sites

Thank you Delphi Dev super as always.

For anyone interested, to applyt the mask to a form different than the main form:

 

UniSession.AddJS(self.Name+'.form.mask("'+UniServerModule.ServerMessages.LoadingMessage+'")');
 
And to unmask:
 
UniSession.AddJS(self.Name+'.form.unmask()');
Link to comment
Share on other sites

  • 4 years later...

hello,

load mask only once when before create a frame and hide mask after created.

procedure TAframe.UniFrameCreate(Sender: TObject);
begin
  UniSession.AddJS('MainForm.form.mask()');
end;

procedure TfmToolbarThemes.UniFrameReady(Sender: TObject);
begin
  UniSession.AddJS('MainForm.form.unmask()');
end;

-> Mask not shown.

====

abutton on design time => screenmask.enabled = true;

procedure mainform.abuttonOnClick(Sender: TObject);
begin
  if not frame created then begin
    do create A frame
    AButton.screenmask.enabled = false;
  end else ...
end;

-> mask keep showing every click button.

any suggestion where i have to put mask and unmask.

thanks.

Link to comment
Share on other sites

 

13 minutes ago, Point said:

hello,

load mask only once when before create a frame and hide mask after created.

procedure TAframe.UniFrameCreate(Sender: TObject);
begin
  UniSession.AddJS('MainForm.form.mask()');
end;

procedure TfmToolbarThemes.UniFrameReady(Sender: TObject);
begin
  UniSession.AddJS('MainForm.form.unmask()');
end;

-> Mask not shown.

====

abutton on design time => screenmask.enabled = true;

procedure mainform.abuttonOnClick(Sender: TObject);
begin
  if not frame created then begin
    do create A frame
    AButton.screenmask.enabled = false;
  end else ...
end;

-> mask keep showing every click button.

any suggestion where i have to put mask and unmask.

thanks.

ps : i am not using Synchronous Operations.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...