Content:
- Methods

Custom dialogs appear on top of the app and thus can be used to show temporary information or collect data from the user. They are also useful for displaying configuration or settings controls.

dlg = app.CreateDialog( title, options ) → app object: Dialog

Dialogs are resizeable and you can also change the look of them so that they fit in with the theme of your application.

A custom dialog needs a layout to add the controls to. Use the CreateLayout method of the app object to add a layout.

layDlg = app.CreateLayout( type, options );
dlg.AddLayout( layDlg );

If you have added all your controls to the dialog layout you can use the Show method to show the dialog.

Normally the user can cancel the dialog by pressing the BACK button of the device, but you can disable that option by using the “NoCancel” option. In order to close the dialog now, you have to call Dismiss.

Example - Demo click to expand contents 

Methods

The following methods are available on the Dialog object:

Focus()
GetAbsHeight() → Number: integer
GetAbsWidth() → Number: integer
GetHeight( options ) → Number
GetLeft( options ) → Number
GetParent() → app object
GetPosition( options ) → Object: { left, top, width, height }
GetTitleHeight() → Number: pixel
GetTop( options ) → Number
GetType() → String: “Dialog”
GetVisibility() → String: “Show” or “Hide” or “Gone”
GetWidth( options ) → Number
Gone()
Hide()
IsEnabled() → Boolean
IsOverlap( obj, depth ) → Boolean
IsVisible() → Boolean
Method( name, types, p1, p2, p3, p4 ) → all types
SetScale( x, y )
Show()