# VScrollArea

**Hereda de**: [Widget](https://doc.velneo.com/25/velneo-vdevelop/scripts/lenguajes/javascript/clases/widget).

Esta clase representa el control de formularios [Área de Scroll](https://doc.velneo.com/25/velneo-vdevelop/proyectos-objetos-y-editores/proyecto-de-aplicacion/formulario/contenedores/area-de-scroll).

## Funciones

[Generales](#funciones-generales)

| Retorno                                                                                                      | Función                                                             |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- |
| [VFormDataView](https://doc.velneo.com/25/velneo-vdevelop/scripts/lenguajes/javascript/clases/vformdataview) | [addForm](#addform)( String szIdRefForm )                           |
| [VFormDataView](https://doc.velneo.com/25/velneo-vdevelop/scripts/lenguajes/javascript/clases/vformdataview) | [form](#form)()                                                     |
| void                                                                                                         | [setScrollBarPolicy](#setscrollbarpolicy)( Number scrollbarpolicy ) |

## Enumeraciones

**ScrollBarPolicy**

* VScrollArea.ScrollBarAsNeeded  = 0. Muestra las barras de scroll si es necesario, valor por defecto.
* VScrollArea.ScrollBarAlwaysOff = 1. Nunca muestra las barras de scroll.
* VScrollArea.ScrollBarAlwaysOn = 2. Siempre muestra las barras de scroll.

## Documentación de funciones

### Funciones generales

#### VFormDataView addForm( String szIdRefForm )

{#addform}

Establece el formulario del área de scroll.

Parámetros:

szIdRefForm: identificador de referencia, *alias\_proyecto/identificador\_formulario*, del formulario a mostrar en el área de scroll.

#### VDataView form() <a href="#form" id="form"></a>

Devuelve un objeto [VFormDataView](https://doc.velneo.com/25/velneo-vdevelop/scripts/lenguajes/javascript/clases/vformdataview) que contiene el formulario que está incluido en el área de scroll.

#### void setScrollBarPolicy( Number scrollbarpolicy ) <a href="#setscrollbarpolicy" id="setscrollbarpolicy"></a>

Define la política para mostrar las barras de scroll.

Parámetros:

* scrollBarPolicy: política para mostrar las barras de scroll. Ver enum ScrollBarPolicy.

### Ejemplos

### 1. Activar las barras de scroll horizontal y vertical a un área de scroll incrustada en un formulario

```javascript
var formulario = theRoot.dataView();
var control = formulario.control("SCRL");
control.setScrollBarPolicy(2);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.velneo.com/25/velneo-vdevelop/scripts/lenguajes/javascript/clases/vscrollarea.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
