A few people have asked me how I created the sections in the Maple application in this video: https://youtu.be/voohdmfTRn0?t=572

Here's the worksheet (Maple 2016 only). As you can see, the “sections” look different what you would normally expect (I often like to experiment with small changes in presentation!)

These aren't, however, sections in the traditional Maple sense; they're a demonstration of Maple 2016's new tools for programmatically changing the properties of a table (including the visibility of its rows and columns). @dskoog gets the credit for showing me the technique.

Each "section" consists of a table with two rows.

  • The table has a name, specified in its properties.
  • The first row (colored blue) contains (1) a toggle button and (2) the title of each section (with the text in white)
  • The second row (colored white) is visible or invisible based upon the state of the toggle button, and contains the content of my section.

Each toggle button has

  • a name, specified in its properties
  • + and - images associated with its on and off states (with the image background color matching the color of the first table row)
  • Click action code that enables or disables the visibility of the second row

The Click action code for the toggle button in the "Pure Fluid Properties" section is, for example,

tableName:="PureFluidProperties_tb":
buttonName:="PureFluidProperties_tbt":
if DocumentTools:-GetProperty(buttonName, 'value') = "false" then   
     DocumentTools:-SetProperty([tableName, 'visible[2..]', true]);
else
     DocumentTools:-SetProperty([tableName, 'visible[2..]', false]);
end if;

As I said at the start, I often try to make worksheets look different to the out-of-the-box defaults. Programmatic table properties have simply given me one more option to play about with.

Please Wait...