Page 1 of 1

is it possible to disable a function ?

Posted: January 10th, 2018, 1:46 pm
by Dzidefo
Hi,
I'm using CAPI version on Android device.
I define a function wich I add to a userbar
Is it possible to disable that function for some items ?

In short, I would like to not allow the investigator to use the function when filling some items...

Thanks !

Re: is it possible to disable a function ?

Posted: January 10th, 2018, 9:07 pm
by khurshid.arshad
Dear Dzidefo

Please use;

onfocus
userbar(hide);

Preproc
userbar(show);


Best.
a.

Re: is it possible to disable a function ?

Posted: January 11th, 2018, 7:26 am
by Dzidefo
I thank you, @khurshid.arshad , for your proposition.

I would like to notice that i have others functions on the userbars, so if I hide it, the investsgator can't get access to others functions.
What could help me, if possible, is to disable the target functions for some items.

Specifically , i would like to enable the target function only for the first Item of each form, and disable it all the rest of Items.

Thanks.

Re: is it possible to disable a function ?

Posted: January 11th, 2018, 7:35 am
by josh
From the online help on userbar:
Removing Items from the Userbar

b = userbar(remove,resource-identifier);

The remove command takes the item pointed to by the resource identifier off the userbar. The function returns 1 if successful, 0 otherwise.
http://www.csprousers.org/help/CSPro/us ... ction.html

Re: is it possible to disable a function ?

Posted: January 11th, 2018, 12:57 pm
by Dzidefo
Thanks Josh.