Jump to content

TUniForm.prompt is Not modal ?


kkelchev

Recommended Posts

HI

 

Is it possible TUniForm.prompt to be with modal behavior.

 

It should be possible TUniForm.ShowMessage is modal.

 

Unfortunately there is no provide source for uniGUIForm.pas and I can't fix it manually.

 

I did try to find solution in this way. But it does not work and block session thread until TimeOut(10sec) is gone

 

----------------------------------------------------------------------------------------------------------------- 

Function InputQueryWEB(Form: TUniBaseForm; Const Msg: String; Var Value: String): Boolean;

Var Res: Boolean;

Val: String;

TimeOutDT: TDateTime;

Begin

 

Res := False;

Val := Value;

TimeOutDT := IncSecond(Now, 10);

Form.Prompt(Msg, Value, mtConfirmation, mbOKCancel,

procedure(Sender: TComponent; AResult: Integer; AText: string)

begin

Res := AResult = mrOK;

if Res then Val := AText;

TimeOutDT := Now;

End, False);

 

while TimeOutDT >= Now do Sleep(100);

if Res then Value := Val;

End; 

---------------------------------------------------------------------------------------------------------------- 

 

 

Thanks

Kamen

Link to comment
Share on other sites

I'm using that function

 

Prompt procedure is method of Form - right ?

 

It seems than internally is sources (UniGUIForm.pas)

The form/dialog with edit that user will enter something is activated/shown

with call like this PrompFormObj.Show (SHOW)

 

Could it be with PrompFormObj.ShowModal ?

 

Why Form.ShowMessage is MODAL but Form.prompt is NOT ?

 

 

Thanks

Kamen

Link to comment
Share on other sites

  • Administrators

I'm using that function

 

Prompt procedure is method of Form - right ?

 

It seems than internally is sources (UniGUIForm.pas)

The form/dialog with edit that user will enter something is activated/shown

with call like this PrompFormObj.Show (SHOW)

 

Could it be with PrompFormObj.ShowModal ?

 

Why Form.ShowMessage is MODAL but Form.prompt is NOT ?

 

 

Thanks

Kamen

 

Prompt displays a Modal window.

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...