Jump to content

ShowMask in PromptCallBack procedure


Phxtecno

Recommended Posts

Hello,

I have no success trying to show a screen mask during a PromptCallBack.

 

After reading a value with the Prompt dialog, I need do some "heavy" work on DB, so the necessity of a showmask.

 

I used the model:

  MainForm.ShowMask('Processing...');
  UniSession.Synchronize();                    // in MainModule is   EnableSynchronousOperations := True 
  ... "do long job"...
  MainForm.HideMask;

But nothing happens...

 

The prompt and callback are used in a TUniFrame, not a form,

but automatic screen mask on other objects (as Buttons) works fine...

 

Can you help ?

 

Best regards,

Marc

 

 

Link to comment
Share on other sites

  • 1 year later...

Hi, 

I have a similar problem showing the screen mask during the elaboration of the callback procedure called from a yesno MessageDlg opened with a button.

I've disabled the button screenmask and enabled the form screenmask. I call ShowMask in callback procedure after  checking the user response. The mask appears and immediatly disappear.  

Link to comment
Share on other sites

4 hours ago, Bocchi said:

I have a similar problem showing the screen mask during the elaboration of the callback procedure called from a yesno MessageDlg opened with a button.

Hi,

Have you tried as in the example above?

Link to comment
Share on other sites

Hi,

Yes I did. 

The code is something like this

procedure xxx.btnbtn1Click(Sender: TObject);
begin
  inherited;
  MessageDlg('Question?',mtConfirmation, [mbYes,mbNo], CallBackProc);
end;

 

procedure xxx.CallBackProc(Sender: TComponent; Res: Integer);
begin
  inherited;

  if (Res = mrNo) then
    Exit;

ShowMask('message');

UniSession.Synchronize;

code

HideMask;

 

The mask appears for less than a second before messagebox is displayed, then it disappears.

I've tried this 

 but it doesn't work.

I also found someone saying that Synchronize doesn't work with callback procedure 

Link to comment
Share on other sites

On 5/13/2019 at 8:22 PM, Bocchi said:

I have a similar problem showing the screen mask during the elaboration of the callback procedure called from a yesno MessageDlg opened with a button.

I've disabled the button screenmask and enabled the form screenmask. I call ShowMask in callback procedure after  checking the user response. The mask appears and immediatly disappear.  

Hello,

Sorry for the late reply,

Can you please make a simple testcase for this, or please open a ticket in the support portal with a test case?

Link to comment
Share on other sites

  • 5 months later...
  • 5 months later...
  • 6 months later...
  • 10 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...