|
![]() |
![]() |
version 2003
PA_Dial4DSetEnable (dialog; variable; enabled)
Parameter | Type | Description | |
dialog | PA_Dial4D | → | Dialog reference |
variable | char* | → | Name of the variable to enable |
enabled | char | → | 1 = 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);