Class

# MobileDocumentViewer

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

## Description

This control class allows iOS users to view and edit (for compatible file types) the most common types of documents, including: PDF, Numbers, Pages, Excel, Word, Video, Images, RTF, plain text etc.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

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

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                  | Parameters                                     | Returns                                     | Shared |
|---------------------------------------|------------------------------------------------|---------------------------------------------|--------|
| `Handle<mobiledocumentviewer.handle>` |                                                | `Ptr</api/data_types/additional_types/ptr>` |        |
| `Show<mobiledocumentviewer.show>`     | files() As `FolderItem</api/files/folderitem>` |                                             |        |

## Events

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                | Parameters                                  | Returns |
|-----------------------------------------------------|---------------------------------------------|---------|
| `Closing<mobiledocumentviewer.closing>`             |                                             |         |
| `DocumentSaved<mobiledocumentviewer.documentsaved>` | file As `FolderItem</api/files/folderitem>` |         |
| `Opening<mobiledocumentviewer.opening>`             |                                             |         |

## Property descriptions

<div id="mobiledocumentviewer.name">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileDocumentViewer.Name

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

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

## Method descriptions

<div id="mobiledocumentviewer.handle">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileDocumentViewer.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>

<div id="mobiledocumentviewer.show">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileDocumentViewer.Show

**Show**(files() As `FolderItem</api/files/folderitem>`)

> Opens the document viewer for the received `FolderItem</api/files/folderitem>` instances.

## Event descriptions

<div id="mobiledocumentviewer.closing">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileDocumentViewer.Closing

**Closing**

> Called when the control's layout is closing.

<div id="mobiledocumentviewer.documentsaved">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileDocumentViewer.DocumentSaved

**DocumentSaved**(file As `FolderItem</api/files/folderitem>`)

> Raised when the user confirms to commit the changes made on the displayed document.

<div id="mobiledocumentviewer.opening">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileDocumentViewer.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"
> ```

## Compatibility

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

<div class="seealso">

`MobileControl</api/user_interface/mobile/mobilecontrol>` parent class, `FolderItem</api/files/folderitem>`

</div>
