Source language: Translate to:

Disable controls

General questions about NeoBook

Moderator: Neosoft Support

Disable controls

Postby stu » Wed Jan 13, 2016 5:19 am

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?
User avatar
stu
 
Posts: 320
Joined: Wed Aug 07, 2013 11:37 am

Re: Disable controls

Postby mishem » Wed Jan 13, 2016 6:02 am

Grouped all objects.

DisableObject "Group1"
mishem
 
Posts: 576
Joined: Mon Oct 08, 2012 1:51 pm

Re: Disable controls

Postby stu » Wed Jan 13, 2016 6:28 am

mishem wrote:Grouped all objects.

DisableObject "Group1"


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

Thanks mishem
User avatar
stu
 
Posts: 320
Joined: Wed Aug 07, 2013 11:37 am


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 2 guests

cron