Class
MobileSearchField
Description
A field for entering search values.
Properties
Name |
Type |
Read-Only |
Shared |
|---|---|---|---|
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
Methods
Events
Name |
Parameters |
Returns |
|---|---|---|
index As Integer |
||
Property descriptions
MobileSearchField.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.
MobileSearchField.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."
MobileSearchField.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.
MobileSearchField.Enabled
Enabled As Boolean
Indicates whether the control is enabled or disabled.
Disable the button:
Button1.Enabled = False
MobileSearchField.Handle
Handle As Ptr
The handle to the underlying native OS control.
This property is read-only.
MobileSearchField.HasScopeBar
HasScopeBar As Boolean
If True, a scope bar with buttons is displayed below the search field, allowing the user to narrow the search to a specific scope.
MobileSearchField.Height
Height As Integer
The height of the control.
This property is read-only on iOS.
MobileSearchField.Hint
Hint As String
Text that appears in the SearchField to indicate what type of search the field will perform.
MobileSearchField.InitialScopeTitles
InitialScopeTitles As String
The initial titles displayed on the scope bar buttons.
MobileSearchField.Left
Left As Integer
The left position of the control.
This property is read-only on iOS.
MobileSearchField.Name
Name As String
The name of the control.
This property is read-only.
MobileSearchField.Parent
Parent As MobileUIControl
The parent (sometimes called a "Super") class of the control.
This property is read-only.
MobileSearchField.ScopeTitles
ScopeTitles As String()
The titles of the scope bar buttons.
ScopeTitles(Assigns items() As String)
Sets the titles of the scope bar buttons.
ScopeTitles(ParamArray items As String)
Sets the titles of the scope bar buttons.
MobileSearchField.SelectedScopeIndex
SelectedScopeIndex As Integer
The index of the currently selected scope bar button.
MobileSearchField.SelectedScopeTitle
SelectedScopeTitle As String
The title of the currently selected scope bar button.
This property is read-only.
MobileSearchField.Text
Text As String
The value of the SearchField.
MobileSearchField.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
PopupMenu
The background color will be drawn in the TintColor.
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.
Switch
The background of the color 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.
MobileSearchField.Top
Top As Integer
The top position of the control.
This property is read-only on iOS.
MobileSearchField.Visible
Visible As Boolean
Indicates whether the control is visible.
Make a button invisible:
Button1.Visible = False
MobileSearchField.Width
Width As Integer
The width of the control.
This property is read-only on iOS.
Method descriptions
MobileSearchField.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.
Important
This is supported for iOS only.
MobileSearchField.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.
Important
This is supported for iOS only.
MobileSearchField.ClearFocus
ClearFocus
Removes the focus from the control.
TextField1.ClearFocus
MobileSearchField.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
MobileSearchField.ControlAt
ControlAt(index As Integer) As MobileUIControl
Gets the child control at the specified index.
Important
This is supported for iOS only.
MobileSearchField.Controls
Controls As Iterable
Allows you to iterate through all the controls that have been added to this control.
Important
This is supported for iOS only.
MobileSearchField.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
MobileSearchField.RemoveConstraint
RemoveConstraint(constraint As iOSLayoutConstraint)
Removes a constraint from the control.
Important
This is supported for iOS only.
RemoveConstraint(name As String)
Removes the constraint with the name passed from the Screen.
Important
This is supported for iOS only.
MobileSearchField.RemoveControl
RemoveControl(child As MobileUIControl)
Removes the control from the control.
Important
This is supported for iOS only.
MobileSearchField.SetFocus
SetFocus
Sets the focus to the control.
TextField1.SetFocus
Event descriptions
MobileSearchField.Closing
Closing
Called when the control's layout is closing.
MobileSearchField.Opening
Opening
Called when the control's layout is opening.
This is where you typically put initialization code.
MobileSearchField.ScopeChanged
ScopeChanged(index As Integer)
Called when the user selects a different scope bar button. The index parameter is the index of the newly selected scope button.
MobileSearchField.SearchPressed
SearchPressed
Called when the user taps the Search button on the keyboard.
MobileSearchField.TextChanged
TextChanged
The text of the SearchField has changed.
Compatibility
Project Types |
Mobile |
Operating Systems |
iOS |
See also
MobileUIControl parent class