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

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