PA_Dial4DSetEnable

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next

version 2003


PA_Dial4DSetEnable (dialog; variable; enabled)

ParameterTypeDescription
dialogPA_Dial4DDialog reference
variablechar*Name of the variable to enable
enabledchar1 = Enable, 0 = Disable

Description

The routine PA_Dial4DSetEnable enables or disables the variable named variable in the dialog referenced by dialog.

If enabled is 1, the variable is enabled. If it is 0, the variable is disabled.

By default, variable needs to be a null terminated C string. If you have previously called PA_UsePStrings, you must pass a Pascal string to the command.

By default, variable needs to use Macintosh characters set on Macintosh, and ANSI characters set under Windows. You can call PA_UseMacCharacters or PA_UseAnsiCharacters to specifically use Macintosh or ANSI characters.

Example

Enable/disable a variable depending on the value of another in the dialog "dRef" :

   /* . . . previous code of the dialog . . . */
   if( PA_Dial4DGetLong(dRef, "enterableLong") < 10 )
      PA_Dial4DSetEnable(dRef, "specialButton", 0);
   else
      PA_Dial4DSetEnable(dRef, "specialButton", 1);

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next