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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...