Page 1 of 1

Make Table that looks like a grid

Posted: Tue Aug 30, 2016 5:49 pm
by norrow
In the midst of DDS conversion....I have had a few occasions where I would like to use the advantages of a grid(sizable columns, headers, oddeven colored rows etc) but cannot use a grid because either the data is not the same or the program was simply not coded as a subfile(screen uses fixed fields that give the appearance of the subfile but each field is unique). I've tried using the "table" widget without much success as it doesn't appear to have variable column widths and provide the features I'm looking for. Has anyone done this before?
An example, is a table that has 3 columns(Description, From, To). Each row represents an item and displays how that item changed(From/To). using a table would provide the ability to align the fields in each column and with a background give the appearance of a grid/table. Also, if this was some type of layout container moving the fields all at once is much easier and less error prone.
Any suggestions?

Re: Make Table that looks like a grid

Posted: Wed Aug 31, 2016 1:42 pm
by Scott Klement
I would simply change the RPG program to write the data into a subfile.

Re: Make Table that looks like a grid

Posted: Wed Aug 31, 2016 6:56 pm
by norrow
Thanks, I had a feeling there wasn't an easy way to do this and rewrite in many cases simply creates unwanted work with little or no payback.

Re: Make Table that looks like a grid

Posted: Fri Sep 02, 2016 2:35 pm
by Scott Klement
True, you'd only want to do it where it'd be worthwhile to take advantage of the features of the grid. (in your words, "sizable columns, headers, oddeven colored rows etc") If you don't need those features, there'd be no payback.

The grid widget has taken a lot of code to implement, somewhere in the neighborhood of (rough estimate) 9000 lines of code. So it would not be easy to duplicate it with another widget. It would be much easier to change your programs to use the actual grid. That also has the benefit that, as time passes and more features are added to the grid, they'd also be available in your programs.