MPanel

From HTML5 Builder
Jump to: navigation, search

The MPanel container allows you to group controls together, with properties and methods to help you manage the placement of its child controls.

When you change the position of a this container, the position of the contained components changes too. It can be also useful when child components inherit properties from it, like Font or Color.

You can use this component, for example, to implement a tool bar.

Usage

Content Scrolling

If you want an MPage to provide scrollbars when its content is bigger than the panel itself (for example, when the content is generated using a DBRepeater):

  1. During the JavaScript event OnPageCreate of the MPage containing the panel, run:
    $("#ComponentName").css('overflow', 'auto');
    $("#ComponentName div[id$='_outer']").css('position', 'relative');

You can replace overflow with overflow-x or overflow-y to provide only horizontal or vertical scrolling.

Client-side Features

DOM Elements

The component generates the following client-side DOM elements:

  • Wrapper (HTMLDivElement). Full web browser support. Access it with $("#ComponentName_outer").get()[0].
    • Main element (HTMLDivElement). Full web browser support. Access it with: $("#ComponentName").get()[0].

Client-side Events

Documented in the RPCL Reference.

Server-side Features

Properties, Methods and Events

Documented in the RPCL Reference.

See Also

  • Alternatives: Panel (web applications).