programming-languages

How do I add a table to a Nytril Document?


I have the Nytril IDE installed and need to add a pie table to my document. I have looked through the tutorial but I am having trouble getting the table to appear.

I tried this, but it doesn't work.

new TableClass(1){
}

Solution

  • It's pretty easy. The table is a formatter, not a class, so you just call the Table function which takes a couple of parameters.

    You can specify a border and column widths, etc..

    Try this:

    Table(1, null, [24 pts, 3 inches]) {
      Row {
        "Number";
        "Name";
      };
      Row {
        1;
        "Bob";
      };
      Row {
        2;
        "Bill";
      };
    }