Using Object Views when creating complex or multi-page 4D forms makes it easier to manage your objects. If you are familiar with graphics applications, you can think of Object Views as "Layers".
Classifying the objects on a form in different Views allows you to show and hide objects or lock and unlock objects in different Views. When creating multi-page forms, you can assign a View to a page in your form and keep all the objects related to that page in a single View, separated from the rest.
Keep in mind that Object Views are simply visual aids; they cannot be accessed programmatically or used in the Application environment.
Let's look at a practical example of using Object Views. We are going to work on a form with 1 page and a Tab Control (2 Tabs) in the Background Page (Page zero). Instead of having the Tabs take me to a page, I will show and hide the objects for the corresponding tab. Therefore, Page 1 will contain all the objects for Tabs 1 and 2.
The Background Page objects will be placed in Object View 1, renamed Background; Page 1 Tab 1 objects will be placed in Object View 2, renamed Tab 1; and Page 1 Tab 2 objects will be placed in Object View 2, renamed Tab 2.
We can select the Views palette from the Form Menu Views List or by clicking on the Views List icon on the toolbar.
The Views List palette will be displayed.
Two options are available in the palette, "Move to view" and "Select all in view":
The Background Page will look like this:
Now I want these objects in Tab 1:
And these objects in Tab 2:
If I don't separate them in Object Views this is what Page 1 would look like:
Basically with objects layered on top of objects it is hard to view a form and work. However, if I select the objects for Tab 1 and Tab 2 and move them to their corresponding Object Views, I can have each View with its own objects. This allows me to view either the Background Page or each Tab individually. In addition, I can lock objects on a View and not move them unintentionally.
This is what Tab 1 would like like if I hide Tab 2:
Furthermore, I can even hide the Background and show only Tab 1 Objects:
Object Views allow more flexibility when dealing with complex 4D forms.
For more detailed information, see the Using Object Views section in the 4D v11 SQL Design Reference.