When 1 table is bigger than screen width

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
stevec
Posts: 138
Joined: Thu Aug 23, 2012 6:45 am

When 1 table is bigger than screen width

Post by stevec »

image.jpg
image.jpg (416.42 KiB) Viewed 6132 times
I can get it to scroll right by leaving grid column default to fit. But the upper tables that we're looking good filling out the width now extend to match the larger table. How can I keep upper tables filling width but let lower table scroll?

If I make it fill that works but lower table will not scroll column headings just the rows of data so you can't tell what the column header is.
stevec
Posts: 138
Joined: Thu Aug 23, 2012 6:45 am

Re: When 1 table is bigger than screen width

Post by stevec »

image.jpg
image.jpg (524.05 KiB) Viewed 6131 times
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: When 1 table is bigger than screen width

Post by MarkDuignan »

Ignoring your entry fields for the moment - if the form had two columns and two rows:

Set grid column 1 to a pixel or % width.

Put the top table at grid row 1, col 1 – so it has to squeeze into the grid col 1 width.

Put the bottom table at grid row 2, col 1 – but spanning both grid columns 1 and 2 – so that it can stretch out with column 2’s width as well.

Then experiment with grid columns 2’s width to stretch out the second table.
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: When 1 table is bigger than screen width

Post by MarkDuignan »

Also see the Layout.DistributeMultiCol property at http://www.longrangemobile.com/docs/lan ... erties.htm

This is how you indicate how the 'extra' width of the table 2 should be apportioned across all the columns it spans.
This may save you from having to specify a fixed width for grid column 1.
You can indicate that because table 2 spans grid columns 1 and 2 that its 'extra' width should all be applied to column 2.
ie: Grid column 1's width is only determined by the width of table 1.
stevec
Posts: 138
Joined: Thu Aug 23, 2012 6:45 am

Re: When 1 table is bigger than screen width

Post by stevec »

Distributecols(Last) did not help. appears to have done nothing. tried on the set_table and also on the set_form.

My grid row 4 column 1 is the problem.

Row 1 has 2 columns
Row 2 has 1 column with table
Row 3 is 1 column drop down
row 4 has 1 column with table. When it is too big too fit is when I have the problem . If I leave it default fit and table layout_cols then width is good but horizontal scroll is rows only not column headings (if column headings too that is what I want). If no table layout cols then the top 3 go as wide as last making it look funny, but last table scrolls correct
Last edited by stevec on Mon May 19, 2014 12:03 pm, edited 1 time in total.
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: When 1 table is bigger than screen width

Post by MarkDuignan »

Did you set that item to span into the second column ?
Unless the item spans multiple columns then the distribute option means nothing.
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: When 1 table is bigger than screen width

Post by MarkDuignan »

Row 4 has 2 columns as well - it is probably not using the second one yet.

In the table on row 4, column 1, set it to span across all columns by using -1 for the colspan option.

Also set it to distribute its extra width into the last (2nd) column.

Or, you could create a grid 3rd column on the to absorb all of the table's width that will not impact anything in grid columns 1 or 2.
stevec
Posts: 138
Joined: Thu Aug 23, 2012 6:45 am

Re: When 1 table is bigger than screen width

Post by stevec »

That seems to make it worse (wider than bottom table now

BTW row 4 is just 1 column (table)

I assume when you say column span you mean layout_cols on the set_table.

tried distribute last on both table and set form

Using grid col 3 leaves filler space on left that is annoying
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: When 1 table is bigger than screen width

Post by MarkDuignan »

In the screen shot - the very first screen element 1 (Name and Account) has a border right around it.
What type of element is that ?
It looks like it is spanning two grid columns?
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: When 1 table is bigger than screen width

Post by MarkDuignan »

There is another way to do this.

You have a (form) grid with a single column set to width 100%.

Rows 1,2, 3 just go into that as now.

In Row 4 you create a sub-form (a Type:Form element).

That sub-form is restricted to 100% of the device width.

Within that sub-form you put then put the table (and anything else you want).

If the table exceeds the width of its ‘viewing port’ form it should scroll sideways independently of anything else on the main form.

I think this is what you are trying to do?

I will try to find an RDMLX example that does this with subforms.
Post Reply