Class
MobileScrollableArea
Description
A scrollable area allows users to view content that is larger than the size of the view itself. This control has one child control that is treated as the content. It determines when scrolling is required by applying the control's auto layout rules and comparing the required size to its own size.
Properties
Name |
Type |
Read-Only |
Shared |
---|---|---|---|
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
Methods
Name |
Parameters |
Returns |
Shared |
---|---|---|---|
constraint As iOSLayoutConstraint |
|||
child As MobileUIControl |
|||
index As Integer |
|||
constraint As iOSLayoutConstraint |
|||
child As MobileUIControl |
|||
Property descriptions
MobileScrollableArea.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."
MobileScrollableArea.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."
MobileScrollableArea.Container
Container As MobileContainer
The container control whose contents will be scrollable if it does not fit entirely within the scrollable area control.
To get the container control so that you can reference methods (or controls) on it:
// Get reference to container control
Var cc As MyContainer
cc = MyContainer(ScrollableArea1.Container) // cast to MyContainer
// Now you can call methods on it
cc.UpdateData
MobileScrollableArea.ControlCount
ControlCount As Integer
The number of child controls in the control.
This property is read-only.
MobileScrollableArea.Enabled
Enabled As Boolean
Indicates whether the control is enabled or disabled.
Disable the button:
Button1.Enabled = False
MobileScrollableArea.Height
Height As Double
The height of the control.
This property is read-only.
MobileScrollableArea.Left
Left As Double
The left position of the control.
This property is read-only.
MobileScrollableArea.Name
Name As String
The name of the control.
MobileScrollableArea.Parent
Parent As MobileUIControl
The parent (sometimes called a "Super") class of the control.
This property is read-only.
MobileScrollableArea.TintColor
TintColor As ColorGroup
Changes a control's tint color.
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. |
MobileScrollableArea.Top
Top As Double
The top position of the control.
This property is read-only.
MobileScrollableArea.Visible
Visible As Boolean
Indicates whether the control is visible.
Make a button invisible:
Button1.Visible = False
MobileScrollableArea.Width
Width As Double
The width of the control.
This property is read-only.
Method descriptions
MobileScrollableArea.AddConstraint
AddConstraint(constraint As iOSLayoutConstraint)
Adds a constraint to the control.
This constraint is used by child controls that have been added to this control.
MobileScrollableArea.AddControl
AddControl(child As MobileUIControl)
Adds a child control to the control.
MobileScrollableArea.ClearFocus
ClearFocus
Removes the focus from the control.
TextField1.ClearFocus
MobileScrollableArea.ControlAt
ControlAt(index As Integer) As MobileUIControl
Gets the child control at the specified index.
MobileScrollableArea.Controls
Controls As Iterable
Allows you to iterate through all the controls that have been added to this control.
MobileScrollableArea.Handle
Handle As Ptr
The a handle to the underlying native OS control.
MobileScrollableArea.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
MobileScrollableArea.RemoveConstraint
RemoveConstraint(constraint As iOSLayoutConstraint)
Removes a constraint from the control.
MobileScrollableArea.RemoveControl
RemoveControl(child As MobileUIControl)
Removes the control from the control.
MobileScrollableArea.ScrollTo
ScrollTo(x As Integer, y As Integer)
Scrolls to the specified x and y coordinates.
MobileScrollableArea.SetFocus
SetFocus
Sets the focus to the control.
TextField1.SetFocus
Event descriptions
MobileScrollableArea.Closing
Closing
Called when the control's layout is closing.
MobileScrollableArea.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
A scrollable area can scroll vertically, horizontally or both.
Compatibility
Mobile projects on all supported mobile operating systems.
See also
MobileUIControl parent class