Class

# AndroidMobileUserControl

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

## Description

Used to embed Android Views (android.view.View) created via declares into the Xojo control hierarchy.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                              | Type                                                          | Read-Only | Shared |
|-------------------------------------------------------------------|---------------------------------------------------------------|-----------|--------|
| `AccessibilityHint<androidmobileusercontrol.accessibilityhint>`   | `String</api/data_types/string>`                              |           |        |
| `AccessibilityLabel<androidmobileusercontrol.accessibilitylabel>` | `String</api/data_types/string>`                              |           |        |
| `Enabled<androidmobileusercontrol.enabled>`                       | `Boolean</api/data_types/boolean>`                            |           |        |
| `Height<androidmobileusercontrol.height>`                         | `Integer</api/data_types/integer>`                            |           |        |
| `Left<androidmobileusercontrol.left>`                             | `Integer</api/data_types/integer>`                            |           |        |
| `LockBottom<androidmobileusercontrol.lockbottom>`                 | `Boolean</api/data_types/boolean>`                            |           |        |
| `LockLeft<androidmobileusercontrol.lockleft>`                     | `Boolean</api/data_types/boolean>`                            |           |        |
| `LockRight<androidmobileusercontrol.lockright>`                   | `Boolean</api/data_types/boolean>`                            |           |        |
| `LockTop<androidmobileusercontrol.locktop>`                       | `Boolean</api/data_types/boolean>`                            |           |        |
| `Name<androidmobileusercontrol.name>`                             | `String</api/data_types/string>`                              | ✓         |        |
| `Parent<androidmobileusercontrol.parent>`                         | `MobileUIControl</api/user_interface/mobile/mobileuicontrol>` |           |        |
| `Top<androidmobileusercontrol.top>`                               | `Integer</api/data_types/integer>`                            |           |        |
| `Visible<androidmobileusercontrol.visible>`                       | `Boolean</api/data_types/boolean>`                            |           |        |
| `Width<androidmobileusercontrol.width>`                           | `Integer</api/data_types/integer>`                            |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                              | Parameters | Returns                                     | Shared |
|---------------------------------------------------|------------|---------------------------------------------|--------|
| `ClearFocus<androidmobileusercontrol.clearfocus>` |            |                                             |        |
| `Handle<androidmobileusercontrol.handle>`         |            | `Ptr</api/data_types/additional_types/ptr>` |        |
| `Refresh<androidmobileusercontrol.refresh>`       |            |                                             |        |
| `SetFocus<androidmobileusercontrol.setfocus>`     |            |                                             |        |

## Events

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                                            | Parameters                                 | Returns                                     |
|---------------------------------------------------------------------------------|--------------------------------------------|---------------------------------------------|
| `AppearanceChanged<androidmobileusercontrol.appearancechanged>`                 | dark As `Boolean</api/data_types/boolean>` |                                             |
| `Closing<androidmobileusercontrol.closing>`                                     |                                            |                                             |
| `CreateView<androidmobileusercontrol.createview>`                               |                                            | `Ptr</api/data_types/additional_types/ptr>` |
| `DrawControlInLayoutEditor<androidmobileusercontrol.drawcontrolinlayouteditor>` | g As `Graphics</api/graphics/graphics>`    |                                             |
| `Opening<androidmobileusercontrol.opening>`                                     |                                            |                                             |

## Constants

> These constants are designed to be used with the <span class="title-ref">MobileUIControl</span> to show icons at the Navigator and Library.
>
> | Name          | Description                                                                                                                                                             |
> |---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
> | NavigatorIcon | This constant is used to override the icon of your control in the Navigator. Using the WebSDKIconConverter, place the Base64 icon data into the value of this constant. |
> | LibraryIcon   | This constant is used to override the icon of your control in the Library. Using the WebSDKIconConverter, place the Base64 icon data into the value of this constant.   |

## Property descriptions

<div id="androidmobileusercontrol.accessibilityhint">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.AccessibilityHint

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

> The accessibility hint is a longer description that is read aloud when VoiceOver is enabled.
>
> ``` xojo
> Me.AccessibilityHint = "Click to calculate the value and display the next screen."
> ```
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is not currently supported for Android.
>
> </div>

<div id="androidmobileusercontrol.accessibilitylabel">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.AccessibilityLabel

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

> The accessibility label of of a control is a short name that is read aloud when VoiceOver is enabled.
>
> ``` xojo
> Me.AccessibilityLabel = "Calculate the value."
> ```

<div id="androidmobileusercontrol.enabled">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.Enabled

**Enabled** As `Boolean</api/data_types/boolean>`

> Indicates whether the control is enabled or disabled.
>
> Disable the button:
>
> ``` xojo
> Button1.Enabled = False
> ```

<div id="androidmobileusercontrol.height">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.Height

**Height** As `Integer</api/data_types/integer>`

> The height of the control.

<div id="androidmobileusercontrol.left">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.Left

**Left** As `Integer</api/data_types/integer>`

> The left position of the control.

<div id="androidmobileusercontrol.lockbottom">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.LockBottom

**LockBottom** As `Boolean</api/data_types/boolean>`

> Determines whether the bottom edge of the control should stay at a set distance from the bottom edge of the parent control, if there is one, or the owning layout.
>
> This property can be set in the control's Inspector.

<div id="androidmobileusercontrol.lockleft">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.LockLeft

**LockLeft** As `Boolean</api/data_types/boolean>`

> Determines whether the left edge of the control should stay at a set distance from the left edge of the parent control, if there is one, or the owning layout.
>
> LockLeft and LockTop default to `True</api/language/true>` when you add a new control to a layout. Existing controls will be altered only if LockRight and/or LockBottom are not set. *LockLeft* has no effect unless *LockRight* is `True</api/language/true>`.
>
> This property can be set in the control's Inspector.

<div id="androidmobileusercontrol.lockright">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.LockRight

**LockRight** As `Boolean</api/data_types/boolean>`

> Determines whether the right edge of the control should stay at a set distance from the right edge of the parent control, if there is one, or the owning layout.
>
> This property can be set in the control's Inspector.

<div id="androidmobileusercontrol.locktop">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.LockTop

**LockTop** As `Boolean</api/data_types/boolean>`

> Determines whether the top edge of the control should stay at a set distance from the top edge of the parent control, if there is one, or the owning layout.
>
> LockTop and LockLeft default to `True</api/language/true>` when you add a control to a layout. Existing controls will be altered only if LockRight and/or LockBottom are not set. *LockTop* has no effect unless *LockBottom* is `True</api/language/true>`.
>
> This property can be set in the control's Inspector.

<div id="androidmobileusercontrol.name">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.Name

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

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

<div id="androidmobileusercontrol.parent">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.Parent

**Parent** As `MobileUIControl</api/user_interface/mobile/mobileuicontrol>`

> The parent (sometimes called a "Super") class of the control.

<div id="androidmobileusercontrol.top">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.Top

**Top** As `Integer</api/data_types/integer>`

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

<div id="androidmobileusercontrol.visible">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.Visible

**Visible** As `Boolean</api/data_types/boolean>`

> Indicates whether the control is visible.
>
> Make a button invisible:
>
> ``` xojo
> Button1.Visible = False
> ```

<div id="androidmobileusercontrol.width">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.Width

**Width** As `Integer</api/data_types/integer>`

> The width of the control.

## Method descriptions

<div id="androidmobileusercontrol.clearfocus">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.ClearFocus

**ClearFocus**

> Removes the focus from the control.
>
> ``` xojo
> TextField1.ClearFocus
> ```

<div id="androidmobileusercontrol.handle">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.Handle

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

> The handle to the underlying native OS control.

<div id="androidmobileusercontrol.refresh">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.Refresh

**Refresh**

> Marks the control so that it will be redrawn during the next event loop.
>
> Call Refresh to force a Canvas to redraw itself:
>
> ``` xojo
> Canvas1.Refresh
> ```

<div id="androidmobileusercontrol.setfocus">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.SetFocus

**SetFocus**

> Sets the focus to the control.
>
> ``` xojo
> TextField1.SetFocus
> ```

## Event descriptions

<div id="androidmobileusercontrol.appearancechanged">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.AppearanceChanged

**AppearanceChanged**(dark As `Boolean</api/data_types/boolean>`)

> Called when the device switches between Light and Dark mode.
>
> Use this event to update any graphics or other UI as needed.

<div id="androidmobileusercontrol.closing">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.Closing

**Closing**

> Called when the control's layout is closing.

<div id="androidmobileusercontrol.createview">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.CreateView

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

> Raised when the control needs you to create your Android View. Return the pointer to the Android View.
>
> Google's Android documentation provides more information on the [Android View](https://developer.android.com/reference/android/view/View).

<div id="androidmobileusercontrol.drawcontrolinlayouteditor">

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

</div>

<div class="rst-class">

forsearch

</div>

AndroidMobileUserControl.DrawControlInLayoutEditor

**DrawControlInLayoutEditor**(g As `Graphics</api/graphics/graphics>`)

> This event allows you to draw a preview of your control in the Layout Editor, similar to how the control will look like in at runtime. As this code will run as a script in the IDE, if it doesn't compile for any reason, you will see what happened in the Messages pane.
>
> This event fires whenever your control needs to be drawn in the Layout Editor.
>
> There is no need to re-open the project or restart the IDE, in order to see changes you make to the code in this event.
>
> For more information of how this works, see `Drawing Your Control<androidmobileusercontrol.drawing_your_control>`.

<div id="androidmobileusercontrol.opening">

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

</div>

<div class="rst-class">

forsearch

</div>

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

## Drawing Your Control

As for Xojo 2026r1 <span class="title-ref">AndroidMobileUserControl</span> has the ability to draw itself in the Layout Editor using the same techniques that you use to draw a control in the Paint event of a Canvas control with one important difference: this event has access to the Properties and Constants of your class.

To draw a preview of your control in the Layout Editor, you must implement the DrawControlInLayoutEditor event. You may wish to implement it even if you're not using it to prevent this event from being available to the end users of your control. Most of the Xojo framework itself is not available in this event. If the code you have placed in the event can't compile or runs into a runtime issue, an amber warning icon will be drawn on your control and the errors will be displayed to the Messages pane.

<div class="important">

<div class="title">

Important

</div>

Methods cannot be called in this event.

</div>

Here's an example of how you would draw a red oval within the bounds of the control:

``` xojo
g.DrawingColor = Color.Red
g.DrawOval(0, 0, g.Width, g.Height)
```

In addition to the standard drawing controls, there are also some methods for accessing the properties and constants in your control.

### Property Methods

**BooleanProperty**(Name as String) as Boolean

> Gets the current value of a Boolean property of your control.

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

**ColorProperty**(name As `String</api/data_types/string>`) As `Color</api/data_types/color>`

> Gets the current value of a Color property of your control.

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

**DoubleProperty**(name As `String</api/data_types/string>`) As `Double</api/data_types/double>`

> Gets the current value of a Double property of your control.

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

**IntegerProperty**(name As `String</api/data_types/string>`) As `Integer</api/data_types/integer>`

> Gets the current value of an Integer property of your control.

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

**PictureProperty**(name As `String</api/data_types/string>`) As `Picture</api/graphics/picture>`

> Gets the current value of a Picture property of your control.

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

**StringProperty**(name As `String</api/data_types/string>`) As `String</api/data_types/string>`

> Gets the current value of a String property of your control.

### Constant Methods

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

**ConstantValue**(name As `String</api/data_types/string>`) As `String</api/data_types/string>`

> Gets the value of a constant in your control as a String.
>
> You can use the ConstantValue of a string stored in a constant, such as "kDescription".:
>
> ``` xojo
> Var s As String = ConstantValue("kDescription")
> g.DrawText(s, 25, 25)
> ```

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

**PictureConstant**(name As `String</api/data_types/string>`) As `Picture</api/graphics/picture>`

> Gets the value of a constant in your control as a Picture.
>
> You can use PictureConstant with the Base64 value (without the type header) of a picture stored in a constant, such as "kIcon":
>
> ``` xojo
> Var icon As Picture = PictureConstant("kIcon")
> g.DrawPicture(icon, 0, 0)
> ```

### Color Methods

**ColorGroup.NamedColor**(name As `String</api/data_types/string>`) As `Color</api/data_types/color>`

> When running on a platform that supports named colors (only macOS at the time of this writing), this method returns the named OS.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> Color names are case sensitive, so the macOS secondary label color should be "secondaryLabelColor".
>
> </div>

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

**TextColor** As `Color</api/data_types/color>`

> Returns the current text color of the platform that the IDE is running on.

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

**FillColor** As `Color</api/data_types/color>`

> Returns the current fill color of the platform that the IDE is running on.

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

**IsDarkMode** As `Boolean</api/data_types/boolean>`

> Returns `True</api/language/true>` if the system is running in dark mode (only macOS at the time of this writing).

### Font Methods

**FontCount** As `Integer</api/data_types/integer>`

> Returns the number of fonts available on the system.

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

**FontAt**(index As `Integer</api/data_types/integer>`) As `String</api/data_types/string>`

> Returns the name of the font at the specified *index*.

### Other Methods

**DebugLog**(msg As `String</api/data_types/string>`)

> Sends *msg* to the Messages pane.

**Print**(msg As `String</api/data_types/string>`)

> Sends *msg* to the Messages pane.

## Compatibility

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

<div id="androidmobiletable/see_also">

<div class="seealso">

`MobileUIControl</api/user_interface/mobile/mobileuicontrol>` parent class

</div>

</div>
