"adjustColumn"
Adjusts the width of a column so that the widest entry has enough space.
Synopsis
shape.adjustColumn(int index);
Parameters
| Parameter | Description |
|---|---|
| shape | Name of the object |
| index | The index of the column |
Description
Adjusts the width of a column so that the widest entry has enough space.
In the following example several lines (different length) are added to the table and the column is adjusted
(widest entry).
main()
{
TABLE1.appendLine("Test", "This is a test");
TABLE1.appendLine("Test", "Testing the table");
}
main()
{
TABLE1.adjustColumn(0);
//Adjust the first column
}
In the following example columns are added to a tree and the column width is adjusted through "adjustColumn".
main()
{
TREE2.addColumn("Name");
TREE2.addColumn("Surname");
TREE2.adjustColumn(0);
TREE2.adjustColumn(1);
}
Assignment
Table, Tree widget
