Jump to content
Developer Wiki and Function Reference Links ×

Problem with Modern Dialog


Recommended Posts

Help me please!

I would like to use Modern Dialog (CreateLayout) with specific control. Usually Dialog Window closes after press 'OK' or 'Cancel' button. Is it possible to close Dialog Window after press non standard push buttons? Please advice how to do it?

Evgeny

Link to comment

Check the VectorScript Archives for the answer to this one. There was a discussion on this back on May 30 or so.

http://lists.nemetschek.net/archives/vectorscript-l.html

Here is a snippit from the thread:

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

Subject: Re: How to close a Modern dialog

Gerard,

The way I do it is like in the code below. The statement "item := 1" is the only additional code required to close the dialog. Your message sounds like you're doing more than necessary...

Matt

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

CASE item OF

{- dialog init -}

SetupDialogC:

BEGIN

{Your code here}

END;

{- dialog cleanup -}

SetdownDialogC:

BEGIN

{Your code here}

END;

{ - OK button case - }

1:

BEGIN

{Your code here}

END;

{ - Cancel button case - }

2:

BEGIN

{Your code here}

END;

{ - Popup Menu case - }

PopupMenuID:

BEGIN

IF {Your code here} THEN item := 1; <--- THIS CLOSES THE DIALOG

END;

END; {CASE}

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

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