The Table component is used to show the end user a two-dimensional matrix with data. The component can also allow the user to select one or more cells of the table, and capture that selection.
This component should only be used directly from the Main Task of Interactive activities, and not from PBL scripts. Within the Main Task of the activity, set Implementation Type to Component, select the Table component and method show.
lines = [["Kate", "Winllow", "08/08/1980"],
["John","Smith", "03/03/1976"],
["Ashley","Derkson", "02/05/1970"]]
myTable = Table()
show myTable using
data = lines,
title = "Table Test",
titles = ["Name", "Surname", "Birthday"],
buttons = ["OK", "Cancel"],
multiSelect = true,
selectable = true
returning pickedRow = selectedData
if (myTable.selection == "OK") then
display pickedRow
end
display "Selected Indexes: " + myTable.selectedIndexes + "\n"+
"Selected Data: " + myTable.selectedData