Difference between revisions of "iOSMobileTable"
From Xojo Documentation
Line 7: | Line 7: | ||
{{Description | {{Description | ||
| text=An iOSTable is used for displaying a list of data.}} | | text=An iOSTable is used for displaying a list of data.}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<dynamictable id="Events" super="MobileUIControl" class="eventTable" title="Events" columns="3"> | <dynamictable id="Events" super="MobileUIControl" class="eventTable" title="Events" columns="3"> | ||
Line 44: | Line 34: | ||
{{Method | name=RowCellData | description=RowData(row As Integer) As MobileTableCellData Returns the cell data for the row. RowData(section As Integer, row As Integer) As MobileTableCellData Returns the cell data for the section and row.}} | {{Method | name=RowCellData | description=RowData(row As Integer) As MobileTableCellData Returns the cell data for the row. RowData(section As Integer, row As Integer) As MobileTableCellData Returns the cell data for the section and row.}} | ||
{{Method | name=RowCount | description=RowCount(section As Integer) As Integer The count of rows in a section.}} | {{Method | name=RowCount | description=RowCount(section As Integer) As Integer The count of rows in a section.}} | ||
− | {{Method | name=ScrollToRow | description=ScrollToRow(row As Integer, animated As Boolean = True, position As ScrollPositions = ScrollPositions.None) Scrolls the table so that the requested row is visible. The row's position when scrolling is finished is controlled by the position parameter. ScrollToRow(section As Integer, row As Integer, animated As Boolean = True, position As ScrollPositions = ScrollPositions.None) Scrolls the table so that the requested row is visible. The row's position when scrolling is finished is controlled by the position parameter.}} | + | {{Method | name=ScrollToRow | description=ScrollToRow(row As Integer, animated As Boolean = True, position As iOSMobileTable.ScrollPositions = iOSMobileTable.ScrollPositions.None) Scrolls the table so that the requested row is visible. The row's position when scrolling is finished is controlled by the position parameter. ScrollToRow(section As Integer, row As Integer, animated As Boolean = True, position As iOSMobileTable.ScrollPositions = iOSMobileTable.ScrollPositions.None) Scrolls the table so that the requested row is visible. The row's position when scrolling is finished is controlled by the position parameter.}} |
{{Method | name=SearchControllerHandle | description= SearchControllerHandle() As Ptr Returns a Ptr to the search controller object.}} | {{Method | name=SearchControllerHandle | description= SearchControllerHandle() As Ptr Returns a Ptr to the search controller object.}} | ||
{{Method | name=SectionTitleAt | description=SectionTitleAt(section As Integer) As String Gets the title for the section. SectionTitle(section As Integer, Assigns value As String) Sets the title for the section.}} | {{Method | name=SectionTitleAt | description=SectionTitleAt(section As Integer) As String Gets the title for the section. SectionTitle(section As Integer, Assigns value As String) Sets the title for the section.}} | ||
Line 60: | Line 50: | ||
{{Property | name=SelectedRow | readonly=yes | type=Pair | description=(Pair) The section and row selected.}} | {{Property | name=SelectedRow | readonly=yes | type=Pair | description=(Pair) The section and row selected.}} | ||
</dynamicTable> | </dynamicTable> | ||
+ | |||
+ | <dynamicTable id="Constructors" super="MobileUIControl" class="methodTable" title="Constructors" columns="1"> | ||
+ | {{Ctor | params=format As Formats | description=Constructor(format As Formats)
Creates a table formatted with the format passed.}} | ||
+ | </dynamicTable> | ||
+ | |||
+ | <dynamictable id="Enumerations" super="MobileUIControl" class="methodTable" title="Enumerations" columns="3"> | ||
+ | {{Enum | name=Formats | description=Indicates the formatting of the table. Used by the Format property. You can set this value using the Format property in the Inspector. (Plain, Grouped)}} | ||
+ | {{Enum | name=RowEditingStyles | description=The styles available for when a row is being edited. Set the style for specific rows in the RowEditingStyle event handler. (None, Delete, Insert)}} | ||
+ | {{Enum | name=ScrollPositions | description=Indicates the position of the table after scrolling to the section/row. Used by the ScrollToRow method. (None, Top, Middle, Bottom)}} | ||
+ | </dynamictable> | ||
== Notes == | == Notes == |
Latest revision as of 23:35, 4 February 2022
This class is supported on Mobile. Use #If...#Endif with the Target... constants to ensure you only use this class where it is supported. |
New in 2020r2
An iOSTable is used for displaying a list of data.
Events | |||||||||
|
Properties | |||||||||||||||||
|
Constructors | |
|
Enumerations | |||
|
Notes
An iOSMobileTable has only a single column of cells so by default it can only show one column of data. Use MobileTableCustomCell to create your own cells with your own cell layout. This allows you to have a cell with its own controls or even multiple columns.
A table can have data added to it in one of two ways: manually or from a data source. Some methods only work with data that was added manually, some methods only work with data added using a data source. If you are adding many rows (100+), you should instead use an iOSMobileTableDataSource for better performance and reduced memory usage.
A table must have at least one section (0-based). If there is only one section, then the section title does not appear in the table.
Sample Code
Add five rows to a table:
Table1.AddSection("")
For i As Integer = 0 To 4
Table1.AddRow(0, "Row " + i.ToString)
Next
See Also
MobileTableCustomCell control; MobileTableCellData, iOSMobileTableRowAction classes; iOSMobileTableDataSource, iOSMobileTableDataSourceEditing, iOSMobileTableDataSourceReordering interfaces; UserGuide:iOS_Table topic