Page 1 of 1

Disable controls

PostPosted: Wed Jan 13, 2016 5:19 am
by stu
Hi...
I got a page with about 50 different components, mainly TextBox and Buttons... I want to allow the user to be able to filled them in once and then when going to another page just disable the controls so they cant be use anymore...

Currently I got this items named like: Page1Control1, Page1Control2, Page1Control3, Page1Control4...

Then I got a boolean a field on a database named 'ReadOnly' when entering the page for the first time the value is 0 and after leaving the page it gets updated to 1, so when coming back It would lock all the control with something like:

loop "1" "50" "[Pos]"
disableobject "Page1Control[Pos]"
enloop

Is there a more efficient way of doing this task?

Re: Disable controls

PostPosted: Wed Jan 13, 2016 6:02 am
by mishem
Grouped all objects.

DisableObject "Group1"

Re: Disable controls

PostPosted: Wed Jan 13, 2016 6:28 am
by stu
mishem wrote:Grouped all objects.

DisableObject "Group1"


Haha! sweet! why didnt I think of that! gosh!

Thanks mishem