Wiki¶
NOTE: in Smart-client the module does (internally) still use the dialogs plugin so nothing changes for you.
Limitations¶
- From Servoy 6.0.4 and up you can use the dialogs module in a login solution. Before that it's not supported.
- Using the Dialogs module in an onClose event doesn't work in Webclient.
Dialogs¶
The following functions are a direct replacement for your plugins.dialogs calls:
- globals.DIALOGS.showInfoDialog(title, message, button, [buttonN])
- globals.DIALOGS.showWarningDialog(title, message, button, [buttonN])
- globals.DIALOGS.showErrorDialog(title, message, button, [buttonN])
- globals.DIALOGS.showQuestionDialog(title, message, button, [buttonN])
- globals.DIALOGS.showInputDialog(title, message, initialValue)
- globals.DIALOGS.showSelectDialog(title, message, optionArray)
Your button text can be long. In the Web-client the module tries to guess the length needed to show the text in the button.
In Smart-client the dialog plugin takes care of this.
Overriding the default settings of the dialogs¶
Set the width of the next dialog window- globals.DIALOGS.setDialogWidth(width)
- globals.DIALOGS.setDialogHeight(height)
- globals.DIALOGS.resetDialogSize()
styles¶
You can override the stylesheet of the dialog with your own stylesheet using the following method.It will be applied to the next dialog window
- globals.DIALOGS.setStylesheet(stylesheetName)
- label.dialogs_message
- label.dialogs_icon_generic
- label.dialogs_icon_info
- label.dialogs_icon_warning
- label.dialogs_icon_error
The default stylesheet looks like this:
label.dialogs_message { font: 12pt 'Lucida Grande', Arial, Helvetica, sans-serif; } label.dialogs_icon_generic { background-image: url('media:///dialogs_icon_generic.png'); } label.dialogs_icon_info { background-image: url('media:///dialogs_icon_info.png'); } label.dialogs_icon_warning { background-image: url('media:///dialogs_icon_warning.png'); } label.dialogs_icon_error { background-image: url('media:///dialogs_icon_error.png'); }
Form In Dialogs¶
For showing a form in a modal dialog you can now use the following function call:- globals.DIALOGS.showFormInModalDialog(formName, [left], [top], [width], [height], [title], [resizable], [showTextToolbar], [windowName])
General¶
And to keep track of what version of this module you are using you can call:- globals.DIALOGS.getVersion()