Class

MobileTableCustomCell


Description

A MobileTableCustomCell is a way to create a group of controls that can be embedded into a table cell. It is a great way to create powerful table layouts.

Properties

Name

Type

Read-Only

Shared

AccessibilityHint

String

AccessibilityLabel

String

AllowDynamicHeight

Boolean

ControlCount

Integer

Enabled

Boolean

Height

Double

Left

Double

Name

String

Parent

MobileUIControl

TintColor

ColorGroup

Top

Double

Visible

Boolean

Width

Double

Methods

Name

Parameters

Returns

Shared

AddConstraint

constraint As iOSLayoutConstraint, name As String = ""

AddControl

child As MobileUIControl, isBeingAdded As Boolean = False

ClearFocus

Constraint

name As String

iOSLayoutConstraint

ControlAt

index As Integer

MobileUIControl

Controls

Iterable

Handle

Ptr

Refresh

RemoveConstraint

constraint As iOSLayoutConstraint

name As String

RemoveControl

child As MobileUIControl

SetFocus

Events

Name

Parameters

Returns

AppearanceChanged

dark As Boolean

Closing

Opening

Property descriptions


MobileTableCustomCell.AccessibilityHint

AccessibilityHint As String

The accessibility hint is a longer description that is read aloud when VoiceOver is enabled.

Me.AccessibilityHint = "Click to calculate the value and display the next screen."

Important

This property is not currently supported for Android.


MobileTableCustomCell.AccessibilityLabel

AccessibilityLabel As String

The accessibility label of of a control is a short name that is read aloud when VoiceOver is enabled.

Me.AccessibilityLabel = "Calculate the value."

MobileTableCustomCell.AllowDynamicHeight

AllowDynamicHeight As Boolean

Allows you to create cells which vary in height based on their content.

The default value for this property is False to maintain backward compatibility. Set this property to True to have the table's row height vary based on the custom cell inserted into it. This is useful if you have different sized custom cells you want to place in the table.

You can also dynamically change the custom cell's content to have the table row height change, but you'll want to change the autolayout constraint for the custom cell when it is added to the table.


MobileTableCustomCell.ControlCount

ControlCount As Integer

The number of child controls in the control.

This property is read-only.

Important

This property is supported for iOS only.


MobileTableCustomCell.Enabled

Enabled As Boolean

Indicates whether the control is enabled or disabled.

Disable the button:

Button1.Enabled = False

MobileTableCustomCell.Height

Height As Double

The height of the control.

This property is read-only.


MobileTableCustomCell.Left

Left As Integer

The left position of the control.

This property is read-only.


MobileTableCustomCell.Name

Name As String

The name of the control.

This property is read-only.


MobileTableCustomCell.Parent

Parent As MobileUIControl

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

This property is read-only.


MobileTableCustomCell.TintColor

TintColor As ColorGroup

Changes a control's tint color.

Important

This is supported for iOS only.

On iOS, the following controls support TintColor:

Enum

Description

ProgressBar

The area indicating the value of the control will be drawn in the TintColor.

Slider

The area indicating the value of the control will be drawn in the TintColor.

TextArea

The cursor and text highlight color will be drawn in the TintColor.

TextField

The cursor and text highlight color will be drawn in the TintColor.


MobileTableCustomCell.Top

Top As Integer

The top position of the control.

This property is read-only.


MobileTableCustomCell.Visible

Visible As Boolean

Indicates whether the control is visible.

Make a button invisible:

Button1.Visible = False

MobileTableCustomCell.Width

Width As Double

The width of the control.

This property is read-only.

Method descriptions


MobileTableCustomCell.AddConstraint

AddConstraint(constraint As iOSLayoutConstraint, name As String = "")

Adds a constraint to the control. The optional name parameter can be used to remove a constraint that was added via code.

This constraint is used by child controls that have been added to this control.


MobileTableCustomCell.AddControl

AddControl(child As MobileUIControl, isBeingAdded As Boolean = False)

Adds a child control to the control. When the value of isBeingAdded is True, the Opening event is triggered for the child control being added.


MobileTableCustomCell.ClearFocus

ClearFocus

Removes the focus from the control.

TextField1.ClearFocus

MobileTableCustomCell.Constraint

Constraint(name As String) As iOSLayoutConstraint

Gets a reference to a named constraint so that you can modify its settings in code.

Important

This is supported for iOS only.

Change an existing (and named) constraint of a control on the Screen:

' "TAWidth" is a width constraint for a TextField that has been given
' a name in the auto-layout Inspector properties.
Var c As iOSLayoutConstraint = Self.Constraint("TAWidth")
c.Offset = 200

MobileTableCustomCell.ControlAt

ControlAt(index As Integer) As MobileUIControl

Gets the child control at the specified index.


mobiletablecustomcell.Controls

Controls As Iterable

Allows you to iterate through all the controls that have been added to this control.


MobileTableCustomCell.Handle

Handle As Ptr

The handle to the underlying native OS control.


MobileTableCustomCell.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:

Canvas1.Refresh

MobileTableCustomCell.RemoveConstraint

RemoveConstraint(constraint As iOSLayoutConstraint)

Removes a constraint from the control.


RemoveConstraint(name As String)

Removes the constraint with the name passed from the Screen.


MobileTableCustomCell.RemoveControl

RemoveControl(child As MobileUIControl)

Removes the control from the control.


MobileTableCustomCell.SetFocus

SetFocus

Sets the focus to the control.

TextField1.SetFocus

Event descriptions


MobileTableCustomCell.AppearanceChanged

AppearanceChanged(dark As Boolean)

Called when a user switches between Light and Dark mode.

Use this event to update any graphics or other UI as needed.


MobileTableCustomCell.Closing

Closing

Called when the control's layout is closing.


MobileTableCustomCell.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":

Me.Text = "Hello"

Notes

To use, add a MobileTableCustomCell to your project (drag it from the Library to the Navigator) and then drag the controls you want into it. You can then use it with the iOSMobileTable.CreateCustomCell method in the table's data source RowData method or with the iOSMobileTable.AddRow method.

Compatibility

Project Types

Mobile

Operating Systems

iOS

See also

MobileContainer parent class; iOSMobileTable control