OpenDialog

<< Click to Display Table of Contents >>

Manual > Control Reference > Common to all controls > Common methods >

OpenDialog


 

Opens the form as a dialog.

 


Syntax 1

OpenDialog(

         basedFormName

         [,systemParam]

         [,openParam]

         )

 


Parameters

 

basedFormName

 

Type:

character

 

Specify the name of the original form you want to display as a dialog. The dialog will be displayed based on this form.

 

systemParam

 

Type:

General purpose

 

System parameters. Each element is "parameter name:value". To specify multiple elements, specify them as an array like this: c("parameter name 1:value 1", "parameter name 2:value 2",...). Note that this parameter does not support map values.

 

Parameters

Default value

explanation

viewName

""

Specifies the text name of the dialog view.If omitted, the name specified in basedFormName will be used.ViewIt must not overlap with the name.Regarding view namesFor more details"About form names and view names"See .

formName

""

Specify the name of the form after the dialog is displayed in text.This is the new form name to reference from the script. If omitted, the name specified in basedFormName will be used. It must not overlap with the currently displayed form name.

title

""

Specifies the title of the dialog in text.

left

-1

Specify the left coordinate of the dialog with a number. Specifying -1 will display it in the center. The base position of the coordinates is specified with basePosX. (The default is 0, which is the left edge of the browser.)

top

-1

The top coordinate of the dialog. Specify -1 to display it in the center. The base position of the coordinates is specified by the basePosY argument. (The default is 0, which is the top of the browser.)

width

-1

The width of the dialog. If you specify -1, the width of the dialog will be the same as the form.

height

-1

The height of the dialog. If you specify -1, the height of the dialog will be the same as the form's height.

minWidth

0

The minimum limit (width) of the dialog when it is reduced in size. If set to 0, there is no limit.

minHeight

0

The minimum limit (height) of the dialog when it is reduced in size. If set to 0, there is no limit.

stretch

DEFAULT

Specifies the stretch mode when the dialog is displayed.

 

NONE

Don't stretch.

STRETCH_FULL

The image is stretched to fit the size of the dialog.

STRETCH_KEEPRATE

The image will be stretched to fit the size of the dialog (maintaining aspect ratio).

RESIZE_FULL

Adjust the form size to fit the dialog size.

RESIZE_KEEPRATE

Adjust the form size to fit the size of the dialog (maintaining aspect ratio).

FORM

Matches the setting of the form's Strech property.

DEFAULT

Matches the setting of the route's Strech property.

 

*If this argument is not specified or if an empty string is specified, the root Strech property will be used.

 

dialogType

0

The type of dialog.

 

0

Normal (with close button)

1

Simple (no close button)

2

No frame (no title bar)

3

Full (with maximize, minimize and close buttons)

4

No frame (title bar) and no border

 

If the dialog is displayed in a way that does not display the close button, you must call ::CloseDialog to close the dialog.

 

resizable

F

If unspecified, the size will not be resizable.

 

T

Allow resizing.

F

Do not allow resizing.

 

basePosX

default

Specify the reference position in the X direction.

 

default

Follow the DialogBasePosX root property.

browser

The left edge of the browser is 0.

parent

The left edge of the parent screen (including dialogs) is 0.

desktop

The left edge of the desktop is 0.

 

basePosY

default

Specify the reference position in the Y direction.

 

default

Follows the DialogBasePosY root property.

browser

The top of the browser is 0.

parent

The top of the parent screen (including dialogs) is 0.

desktop

The top of the desktop is 0.

 

alreadyOpened

error

Specifies the behavior if the dialog is already displayed.

 

error

If it is already open, an error is returned.

show

If it is already open or hidden, it will be made visible. If it is open with OpenModalDialog, it will be made visible modally.

 

showState

show

Specifies the visibility of the dialog.

 

show

Opens the dialog in its normal state.

hide

Opens the dialog in a hidden state.

 

modal

F

Specifies whether the dialog is modal.

 

T

Opens in a modal view.

F

Opens in a non-modal (normal) view.

 

visualTheme

""

Specifies the visual theme name in text.

 

 

Example: When there is only one element

::OpenDialog("Form01","viewName:Dialog01");

 

Example: In the case of multiple elements

::OpenDialog("Form01",c("viewName:Dialog01","formName:dlgForm01","stretch:STRETCH_FULL","dialogType:1","resizable:T"));

 

 

openParam

 

Type:

General purpose

 

Open parameter. Each element is "parameter name:value". To specify an array, use c("parameter name 1:value 1", "parameter name 2:value 2",...). It is also possible to pass a map value generated by the MAP route method.

 

The information passed in the open parameters can be retrieved from the called form's script using the GetOpenParam method.

 

Return Value

 

 

Type:

Boolean

 

FALSE - Failure. TRUE - Success.

 


hmtoggle_plus1Explanation

 

hmtoggle_plus1Example

 

hint

Dialog-related methods are provided as common methods.

For example, it can be executed as a form method, like "this.OpenDialog (...)", or as a root method, like "::OpenDialog(...)".

Regardless of how you call it, the dialog will not be hidden behind the form, but the behavior will differ if multiple dialogs are displayed at the same time.

 

■ When executed as a form method

The displayed dialog will always be displayed in front of the object that called it (it will never be hidden behind the object that called it).

In other words, if you display another dialog from the form of a displayed dialog, such as "this.OpenDialog (...)", the latter dialog will be displayed in front of the earlier dialog, and will not be hidden behind the calling dialog, even if you click on it.

 

■ When executed as a route method

If multiple dialogs are displayed as a root method ("::OpenDialog(...)"), each dialog will be positioned at the same hierarchy, allowing the operator to freely move between multiple dialogs with the mouse.

 

hint

When you open a dialog, you might want to prevent touching the rear screen until the dialog is closed.In such cases, you can deal with the problem by displaying the dialog modally (displayed in the foreground). In a modal display, the window is displayed in the foreground and cannot be operated or moved forward or backward. In addition to specifying T for the system parameter "modal" when calling this method, you can also display the dialog modally using the "OpenModalDialog" method.

If you want to change only the visibility state without closing the dialog (if you want to only show/hide), use the root ShowDialog method.

 

 


Syntax 2

OpenDialog(

         viewName,

         basedFormName,

         [,formName]

         [,title = ""]

         [,left = -1]

         [,top = -1]

         [,width = -1]

         [,height = -1]

         [,stretch = "default"]

         [,dialogType = 0]

         [,resizable = FALSE]

         [,basePosX = "default"]

         [,basePosY = "default"]

         [,openParam]

         )

 


Parameters

 

viewName

 

Type:

character

 

The name of the view (any name). For details, see"About form names and view names"If omitted, the name specified in basedFormName will be the view name.

 

basedFormName

 

Type:

character

 

Specify the name of the original form you want to display as a dialog. The dialog will be displayed based on this form.

 

formName

 

Type:

character

 

Name of the form after display (any name). Specify a new form name to reference from the script. If omitted, the name specified in basedFormName will be the form name to reference from the script. This form name must not overlap with the main form or the form name of the open dialog.

 

title

 

Type:

character

 

The title of the dialog.

 

left

 

Type:

Number

 

The left coordinate of the dialog. Specifying -1 will display it in the center. The base position of the coordinates is specified by the basePosX argument. (The default is 0, which is the left edge of the browser.)

 

top

 

Type:

Number

 

The top coordinate of the dialog. Specify -1 to display it in the center. The base position of the coordinates is specified by the basePosY argument. (The default is 0, which is the top of the browser.)

 

width

 

Type:

Number

 

The width of the dialog. If you specify -1, the width of the dialog will be the same as the form.

 

height

 

Type:

Number

 

The height of the dialog. If you specify -1, the height of the dialog will be the same as the form's height.

 

stretch

 

Type:

character

 

The form size will be increased to fit the dialog size.

 

"NONE" - no stretching

"STRETCH_FULL" - Stretch to fit the size of the dialog.

"STRETCH_KEEPRATE" - Stretch the image to fit the size of the dialog (keep aspect ratio)

"RESIZE_FULL" - Adjust form size to fit dialog size

"RESIZE_KEEPRATE" - Adjust form size to fit dialog size (keep aspect ratio)

"FORM" - Match the setting of the form's Strech property

"DEFAULT" - Matches the setting of the route's Strech property

 

*If this argument is not specified or if an empty string is specified, the root Strech property will be used.

 

dialogType

 

Type:

Number

 

The type of dialog.

0 - Normal (with close button)

1-Simple (no close button)

2- No Frame (No Title Bar)

3- Full (with maximize, minimize and close buttons)

In the "1-Simple" case, you need to call ::CloseDialog to close the dialog.

 

resizable

 

Type:

Boolean

 

If unspecified, the size will not be resizable.

 

basePosX

 

Type:

character

 

The reference X-position.

"default" - follows the DialogBasePosX root property

"browser" - The left edge of the browser is 0.

"parent" - The left edge of the parent screen (including dialogs) is 0.

"desktop" - The left edge of the desktop is 0.

 

basePosY

 

Type:

character

 

The reference Y position.

"default" - follows the DialogBasePosY root property

"browser" - The top of the browser is 0.

"parent" - The top edge of the parent screen (including dialogs) is 0.

"desktop" - The top edge of the desktop is 0.

 

openParam

 

Type:

General purpose

 

Open parameter. Each element is "parameter name:value". To specify an array, use c("parameter name 1:value 1", "parameter name 2:value 2",...). It is also possible to pass a map value generated by the MAP route method.

 

The information passed in the open parameters can be retrieved from the called form's script using the GetOpenParam method.

 

Return Value

 

 

Type:

Boolean

 

FALSE - Failure. TRUE - Success.

 


hmtoggle_plus1Explanation

 

hmtoggle_plus1Example

 


Supported


×

Script Action

○

Browser script

×

Calculation formula syntax

 


reference