InputDialog

Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.

SalBoolean InputDialog( SalString sTitle,
		     SalString sLabel,
		     ref SalString sValue )

The InputDialog method displays a small input dialog with a label, a data field for entry and OK + Cancel buttons.

Parameters

Name Description
SalString sTitle Window title of the dialog. This parameter should be a translatable constant.
SalString sLabel Label which is displayed above the entry field. This parameter should be a translatable constant.
ref SalString sValue Value entered by the user. If this parameter has a value upon calling the InputDialog method, that value is showed as default.

Returns

The return value is TRUE if the user presses the OK button, FALSE if user presses Cancel button

Example

Constants
   String: TEXT_RenameTitle = 'TEXT_RenameTitle: Rename Item' 
   String: TEXT_RenameLabel = 'TEXT_RenameLabel: New name:'
Actions
   If InputDialog( TEXT_RenameTitle, TEXT_RenameLabel, sName )
       ! Rename item
   Else
       Return FALSE 
C# code
sName = fcItem.GetName();
sTitle = Vis.StrChoose(fcItem._FlagGet() == Const.NAVIGATOR_Parent, 
Const.TEXT_NavigatorRenameFolder, Const.TEXT_NavigatorRenameItem); if (Int.InputDialog(sTitle, Const.TEXT_NavigatorRenameLabel, ref sName)) { // If the name have changed to something other than null update if (sName != Const.strNULL && sName != fcItem.GetName()) { fcItem.SetName(sName); __SetNavigatorItem(hItem, fcItem); __SaveItem(fcItem); } return 1; } return 0;