GUIKIT PACKAGE
{}

"Table"

Widget["Table"]
represents a table.

DetailsDetails

  • To use Widget["Table"], you first need to load GUIKit using Needs["GUIKit`"].
  • By default, all cells are editable. All cells in Widget["DisplayOnlyTable"] are noneditable.
  • By default, most data stored in tables will be strings and left-aligned within the cells. However, it is possible to store, display, and retrieve Booleans, numbers, and images within table columns with more native controls using checkboxes, right-aligned text, and icons, respectively.
  • To display images, you will need to set to False to avoid corrupting the original images.
  • It is important that all data within a given column match either the first row's types or the property types if specified, because tables currently do not support rendering different data types on different rows within the same column.
  • The following properties are available:
  • "items"{}the contents of the table
    "tableHeader"Nullthe table header
    "rowSelectionAllowed"Truewhether each row can be selected
    "columnSelectionAllowed"Falsewhether each column can be selected
    "columnEditable"Nullwhether cells in each column can be edited
    "columnSortable"Nullwhether each column can be sorted by clicking the header
    "prototype"Nullhow to format a typical row of data
    "model" the model that intercedes between the user interface and the data in the table

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

Create a basic table inside a scroll view:

In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
Out[5]=

Get the entire table contents:

In[6]:=
Click for copyable input
Out[6]=

Get and set individual rows:

In[7]:=
Click for copyable input
In[8]:=
Click for copyable input
Out[8]=
In[9]:=
Click for copyable input
Out[9]=
In[10]:=
Click for copyable input
In[11]:=
Click for copyable input
Out[11]=

Change the column headers:

In[12]:=
Click for copyable input
In[13]:=
Click for copyable input
Out[13]=

Use the component to add rows:

In[14]:=
Click for copyable input
In[15]:=
Click for copyable input
Out[15]=

Add columns:

In[16]:=
Click for copyable input
In[17]:=
Click for copyable input
Out[17]=

Remove rows:

In[18]:=
Click for copyable input
In[19]:=
Click for copyable input
Out[19]=
In[20]:=
Click for copyable input
In[21]:=
Click for copyable input
Out[21]=

Query and change individual cells:

In[22]:=
Click for copyable input
Out[22]=
In[23]:=
Click for copyable input
In[24]:=
Click for copyable input
Out[24]=
New to Mathematica? Find your learning path »
Have a question? Ask support »