"columnMovingEnabled"

Single columns of a table can be dragged by means of the mouse.

Synopsis

shape.columnMovingEnabled(bool);

Parameter

Parameter Description
shape Name of the object
bool TRUE = Columns of a table can be dragged with the help of the mouse.

Description

Single columns of a table can be dragged with the help of the mouse.

Example

In this example, names will be added to TABLE1. The columns of TABLE1 can be dragged with the help of the mouse.

You have to add at least a semicolon to the "clicked" event of the table in order to use the columnMovingEnabled.

main()
{
  dyn_string d1, d2, d3;
  dyn_dyn_string vnam, nnam;
  // The entries of the column Vorname
  d1=makeDynString("Peter", "green", "red");
  d2=makeDynString("Martin", "[100,50,50]", "[25,60,100]");
  d3=makeDynString("Christian", "[50,50,50]", "red");
  //Set the values
  vnam[1]=d1;
  vnam[2]=d2;
  vnam[3]=d3;
  // Entries of the column Nachname
  d1=makeDynString("Bauer", "green", "red");
  d2=makeDynString("Müller", "[100,50,50]", "[25,60,100]");
  d3=makeDynString("Schmidt", "[50,50,50]", "red");
  //Set the values
  nnam[1]=d1;
  nnam[2]=d2;
  nnam[3]=d3;
  // Add the values to the table
  TABLE1.appendLines(3, "Vorname", vnam, "Nachname", nnam);
  //enable column moving
  TABLE1.columnMovingEnabled(TRUE);
}
Figure 1. Table, drag Column

Assignment

Table