Using checkbox as a controller

Hi, I'm creating a custom process and I'm a naive BST user.
I do have a Checkbox as a controller defined as follows:

% === Zero-Padding Checkbox
sProcess.options.isZeroPad.Comment     = 'Zero-Padding in case of short epochs';
sProcess.options.isZeroPad.Type        = 'checkbox';
sProcess.options.isZeroPad.Value       = 0;
sProcess.options.isZeroPad.Class       = 'cZeroPad';

% === Zero-Padding
sProcess.options.minlengthzeropad.Comment     = 'Minimum epoch length';
sProcess.options.minlengthzeropad.Type        = 'value';
sProcess.options.minlengthzeropad.Value       = {5, 'seconds', 1};
sProcess.options.minlengthzeropad.Class       = 'cZeroPad';
sProcess.options.minlengthzeropad.Hidden      = 1;

I gave the control a class name 'cZeroPad' as suggested in the tutorial.

Could someone point me to an example script on how to make the text box toggling (hidden/visible) depending on the checkbox value (0/1)?

Many thanks,
Velu

Hi @vpkumaravel

This option doesn't allow to make the text box visible or not; but will make it editable or not. You can remove sProcess.options.minlengthzeropad.Hidden = 1; and see the impact of checking the checkbox on that input

Also, the definition of your checkbox should be :
sProcess.options.isZeroPad.Controller = 'cZeroPad';

Regards
Edouard

1 Like

Hi @edelaire,

Great. It works. Thanks much!

Velu