PLUS+1 User Forum

PLUS+1 Tools => PLUS+1 GUIDE => Topic started by: Pankaj2020 on October 04, 2021, 11:29:56 AM

Title: 2D table in Plus+1
Post by: Pankaj2020 on October 04, 2021, 11:29:56 AM

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

How???  ??? ???

Title: Re: 2D table in Plus+1
Post by: FluidPowerTom on October 05, 2021, 05:09:38 PM
...2D table?  Are you talking about like a spreadsheet type table or an array?
Title: Re: 2D table in Plus+1
Post by: BrianF on October 05, 2021, 06:21:21 PM
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.