Difference between revisions of "iOSMobileTable.CreateCell"

From Xojo Documentation

Line 3: Line 3:
 
| ownertype = class
 
| ownertype = class
 
| scope = public
 
| scope = public
| parameters = value As [[String]] = "", detail As [[String]] = "", image As [[Picture]] = Nil, accessory As [[iOSMobileTableCellData.AccessoryTypes|AccessoryTypes]] = AccessoryTypes.None
+
| parameters = value As [[String]] = "", detail As [[String]] = "", image As [[Picture]] = Nil, accessory As [[MobileTableCellData.AccessoryTypes|AccessoryTypes]] = AccessoryTypes.None
 
| owner = [[iOSMobileTable]]
 
| owner = [[iOSMobileTable]]
| returntype = [[iOSMobileTableCellData]]
+
| returntype = [[MobileTableCellData]]
 
| project=Mobile
 
| project=Mobile
 
}}
 
}}
Line 30: Line 30:
  
 
== Notes ==
 
== Notes ==
Use this method in place of the [[iOSMobileTableCellData]] Constructor that was available in versions prior to 2016r2.
+
Use this method in place of the [[MobileTableCellData]] Constructor that was available in versions prior to 2016r2.
  
 
== Sample Code ==
 
== Sample Code ==
Line 36: Line 36:
 
<rbcode>
 
<rbcode>
 
Table1.AddSection("") ' No section will appear
 
Table1.AddSection("") ' No section will appear
Var cell As iOSMobileTableCellData
+
Var cell As MobileTableCellData
cell = Table1.CreateCell("Red Sox", "MLB", redSoxLogo, iOSMobileTableCellData.AccessoryTypes.Detail)
+
cell = Table1.CreateCell("Red Sox", "MLB", redSoxLogo, MobileTableCellData.AccessoryTypes.Detail)
 
Table1.AddRow(0, cell)
 
Table1.AddRow(0, cell)
 
</rbcode>
 
</rbcode>
  
 
==See Also==
 
==See Also==
[[iOSMobileTableCellData]] class.
+
[[MobileTableCellData]] class.

Revision as of 16:01, 17 November 2020

Method

iOSMobileTable.CreateCell(value As String = "", detail As String = "", image As Picture = Nil, accessory As AccessoryTypes = AccessoryTypes.None) As MobileTableCellData

Supported on Mobile.

Creates a standard table cell, optionally pre-populating its properties with the specified arguments.

Parameters

Parameter Description
value The text of the cell. This is the main (large) text that appears for the row.
detail The the smaller text that appears below the main Text in the cell.
image The image for the cell.
accessory The accessory type that is displayed in the cell.

Notes

Use this method in place of the MobileTableCellData Constructor that was available in versions prior to 2016r2.

Sample Code

Create a new cell and add it to a table:

Table1.AddSection("") ' No section will appear
Var cell As MobileTableCellData
cell = Table1.CreateCell("Red Sox", "MLB", redSoxLogo, MobileTableCellData.AccessoryTypes.Detail)
Table1.AddRow(0, cell)

See Also

MobileTableCellData class.