arilotta Posted January 8, 2018 Share Posted January 8, 2018 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 More sharing options...
Sherzod Posted January 8, 2018 Share Posted January 8, 2018 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 More sharing options...
arilotta Posted January 8, 2018 Author Share Posted January 8, 2018 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 More sharing options...
Point Posted February 26, 2022 Share Posted February 26, 2022 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 More sharing options...
Point Posted February 26, 2022 Share Posted February 26, 2022 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 More sharing options...
Point Posted February 28, 2022 Share Posted February 28, 2022 hi @Sherzod, is it impossible in asynchronous ? Link to comment Share on other sites More sharing options...
Sherzod Posted February 28, 2022 Share Posted February 28, 2022 Hi @Point If I understand you correctly, you can use ClientEvents. Link to comment Share on other sites More sharing options...
Point Posted February 28, 2022 Share Posted February 28, 2022 i was try it but still not success, would you mind give me some sample code ? Link to comment Share on other sites More sharing options...
Sherzod Posted February 28, 2022 Share Posted February 28, 2022 Can you make a simple testcase!? Link to comment Share on other sites More sharing options...
Point Posted February 28, 2022 Share Posted February 28, 2022 ehmm, i think too hard and i miss something in my code. now worked !. sorry mr sherzod. Link to comment Share on other sites More sharing options...
Sherzod Posted February 28, 2022 Share Posted February 28, 2022 No problem. So, problem solved? Link to comment Share on other sites More sharing options...
Point Posted March 1, 2022 Share Posted March 1, 2022 yes, thanks you Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now