Class

# MobileControl

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

The base class for most mobile controls.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                       | Type                             | Read-Only | Shared |
|----------------------------|----------------------------------|-----------|--------|
| `Name<mobilecontrol.name>` | `String</api/data_types/string>` | ✓         |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                           | Parameters | Returns                                     | Shared |
|--------------------------------|------------|---------------------------------------------|--------|
| `Handle<mobilecontrol.handle>` |            | `Ptr</api/data_types/additional_types/ptr>` |        |

## Events

<div class="rst-class">

table-centered_column_4

</div>

| Name                             | Parameters | Returns |
|----------------------------------|------------|---------|
| `Closing<mobilecontrol.closing>` |            |         |
| `Opening<mobilecontrol.opening>` |            |         |

## Property descriptions

<div id="mobilecontrol.name">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileControl.Name

**Name** As `String</api/data_types/string>`

> The name of the control.
>
> This property is read-only.

## Method descriptions

<div id="mobilecontrol.handle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileControl.Handle

**Handle** As `Ptr</api/data_types/additional_types/ptr>`

> The handle to the underlying native OS control.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>

## Event descriptions

<div id="mobilecontrol.closing">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileControl.Closing

**Closing**

> Called when the control's layout is closing.

<div id="mobilecontrol.opening">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileControl.Opening

**Opening**

> Called when the control's layout is opening.
>
> This is where you typically put initialization code.
>
> This example in the Opening event of a label sets its text to "Hello":
>
> ``` xojo
> Me.Text = "Hello"
> ```

## Notes

You cannot instantiate <span class="title-ref">MobileControl</span> directly.

<span class="title-ref">MobileControl</span> cannot be subclassed on Android.

## Compatibility

|                       |        |
|-----------------------|--------|
| **Project Types**     | Mobile |
| **Operating Systems** | All    |

<div class="seealso">

`Object</api/data_types/additional_types/object>` parent class; `MobileUIControl</api/user_interface/mobile/mobileuicontrol>` class.

</div>
