wf_dialogs_open()

The function wf_dialogs_open opens a pop-up dialog.

Synopsis

int wf_dialogs_open(int iDialogType, string sPanelName, langString lsDialogText, &dyn_string dsAnswer, &dyn_float dfAnswer, dyn_anytype daData, [string sHelpKey] );

Parameters

Parameter Description
iDialogType

Defines the dialog type that should be opened

Following types are available:

WF_DIALOGS_PANEL_TYPE_YES_NO:

A dialog with the following buttons:

Button Yes: makeDynFloat(1), makeDynString("TRUE")\n

Button No: makeDynFloat(0), makeDynString("FALSE")\n

Cancel (x on window) : makeDynFloat(), makeDynString()\n

WF_DIALOGS_PANEL_TYPE_CB:

A dialog with the following buttons:

Button OK : makeDynFloat(NoOfSelectedItem),

makeDynString(SelectedText)\n

NoOfSelectedItem - No of position of selected item in list of items not

selectedPosition in CB\n

Button Cancel: makeDynFloat(-1), makeDynString()\n

Cancel(x on window): makeDynFloat(), makeDynString()\n

WF_DIALOGS_PANEL_TYPE_OK:

A dialog with the button "OK")\n

Button OK: makeDynFloat(1), makeDynString("TRUE")\n

Cancel (x on window): makeDynFloat(), makeDynString()\n

WF_DIALOGS_PANEL_TYPE_INPUT:

A dialog with the following buttons:

Button OK : makeDynFloat(NewValue), makeDynString(NewValue)\n

Button Cancel: makeDynFloat(OldValue), makeDynString(OldValue)\n

Cancel (x on window): makeDynFloat(), makeDynString()\n

WF_DIALOGS_PANEL_TYPE_OK_CANCEL:

A dialog with the following buttons:

Button OK : makeDynFloat(1), makeDynString("TRUE")\n

Button Cancel: makeDynFloat(), makeDynString()\n

Cancel (x on window): makeDynFloat(), makeDynString()\n

WF_DIALOGS_PANEL_TYPE_LIST:

A dialog with the following buttons:

Button OK : makeDynFloat(1), makeDynString("TRUE")\n

Button Cancel: makeDynFloat(), makeDynString()\n

Cancel (x on window): makeDynFloat(), makeDynString()\n

sPanelName Panel name used as window title
lsDialogText Text that should be used inside the dialog
dsAnswer Dialog answers as dyn_string
dfAnswer Dialog answers as dyn_float
daData Additional data that is used for dollar parameters
sHelpKey Keyword for the help button.

Return Value

The function returns 0 when it is successfully executed and otherwise -1.

Error

Missing or wrong arguments

Description

The function wf_dialogs_open opens a pop-up dialog.

Example

The function opens the dialog type WF_DIALOGS_PANEL_TYPE_YES_NO. The help button is shown since the help keyword was specified.

#uses "wizardFramework.ctl"
main()
{
  int i;
  dyn_string answ;
  dyn_float flAnsw;
  dyn_dyn_anytype dData = makeDynAnytype((string)"Dialog info");
  langString myLang = "Dialog1";
  i = wf_dialogs_open(WF_DIALOGS_PANEL_TYPE_YES_NO, "wizardFrameworkHugo.pnl", myLang,
  answ, flAnsw, dData,"para");
  DebugN("Return value:", i, answ, flAnsw);
}
Abbildung 1. Pop-Up dialog

Assignment

Wizard framework

Availability

UI, CTRL