Fusion provides various types of controls (CommandInput) for a command. There is a Python demo in API help.
Table type is available with API. It can even embed sub controls within the table or table cell, by which we can implement more scenarios of customization. In my practice recently, I got some knowledge of Table. I am writing down for reference. The whole demo codes has been posted to
https://github.com/xiaodongliang/Fusion-Table-Control
1. CommandInputs.addTableCommandInput adds a new table to the dialog. It defines the table Id, name, columns number and the width ratio of each column. e.g. the code below specifies the table has 3 columns with same width.
tableInput = inputs.addTableCommandInput(commandId +'my_table', 'Table', 3, '1:1:1')
2. To add a child control to the cell, you need firstly get tableInput.commandInputs and call
tableInput.addCommandInput (child_control,rowindex, column index)
Note: The API demo above uses childCommandInputs, but this method has been removed. Now please use tableInput.commandInputs
3. If you want to add a child control that locates within the table, instead of a cell, the method is:
tableInput.addToolbarCommandInput(child_control)
4. , any input changing of a control will fire InputChangedEventHandler. Typically, we will get out the inputs collection of the dialog, and find out the specific control. But in C++, it will be null if getting inputs collection by eventArgs->inputs(). Fortuently, a workaround is available as below.
class MyCommandInputChange : public InputChangedEventHandler
{
public:
void notify(const Ptr& eventArgs) override
{
Ptr changedInput = eventArgs->input();
//One issue: in C++, eventArgs->inputs() is invalid if the event is fired for the embedded control within a table
//Ptr inputs = eventArgs->inputs();
//workaround:
Ptr command = eventArgs->firingEvent()->sender();
Ptr inputs = command->commandInputs();