Author Topic: 2D table in Plus+1  (Read 11575 times)

Offline Pankaj2020

  • PLUS+1 Novice
  • *
  • Posts: 4
  • Karma: +0/-0
2D table in Plus+1
« on: October 04, 2021, 11:29:56 AM »
Hi,

Does anybody tried or know if 2D tables can be used in plus+1.

How???  ??? ???

Thanks,
Pankaj

Offline FluidPowerTom

  • PLUS+1 Guru
  • *****
  • Posts: 363
  • Karma: +33/-0
Re: 2D table in Plus+1
« Reply #1 on: October 05, 2021, 05:09:38 PM »
...2D table?  Are you talking about like a spreadsheet type table or an array?
Controls Engineer
Hydra-Power Systems

Offline BrianF

  • PLUS+1 Developer
  • ***
  • Posts: 15
  • Karma: +0/-0
Re: 2D table in Plus+1
« Reply #2 on: October 05, 2021, 06:21:21 PM »
Pankaj,
Are you trying to display a table or as FPTom asked are you trying to do a 2D array in code? 

I just ran into the issue of trying to display a 2D table. What I did is make a widget for a row, and a widget for a table header.  Each widget has a fixed number text boxes that I use to display each column of data. My columns are static so it makes the problem much easier.  I am able to fix the size of the text boxes and I know how many total columns I have.

In the display code I have a screen with a single header and a bunch of rows.  I enable and populate each row in the code as I need them.  I made an additional array in my code which is a valid flag. I use that flag to hide/show the row.
 
My table was fairly simple as I use it to display a list of error messages with additional location information, and an occurrence count.  Each of my columns are individual 1D arrays since I know the data types and number of columns that I am displaying.

Hope this sparks some ideas for you.

Regards,
Brian