Screen with multiple rows and columns (RPG)

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’.
Post Reply
MCUNNINGHAM
Posts: 1
Joined: Tue May 15, 2012 6:44 am

Screen with multiple rows and columns (RPG)

Post by MCUNNINGHAM »

How do I divide a screen into a row covering the entire top 5% of the screen, and then two columns (one of 20% and another of 80%) below it. See the example below from the tutorials, but further dividing the red portion into two sections (perhaps red and green).
Attachments
image107_144.jpg
image107_144.jpg (26.02 KiB) Viewed 4862 times
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: Screen with multiple rows and columns

Post by MarkDuignan »

I think that the top cell (1,1) would have Width=Fill, Height=5% and Layout.Cols =-1 so it spans across all columns.

The left lower cell (1,2) would have Width=20%, Height=Fill.

The right lower cell (2,2) would have Width=50%, Height=Fill.

Happy to supply some code - please advise whether RPG or RDMLX format is best for you.
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: Screen with multiple rows and columns

Post by MarkDuignan »

The attached example RPG program contains a generic sub-function that can create screen content dynamically.

It builds the screens below using this RPG code

// Row: Col: Height: Width: Backcolor: TextColor: Text: RowSpan: ColSpan
MakeCell (1 : 1 : '5%' : 'Fill' :'Red' : 'White' : 'Top' : 0 : -1);
MakeCell (2 : 1 : 'Fill' : '50%' :'Blue' : 'White' : 'Left' : 0 : 0);
MakeCell (2 : 2 : 'Fill' : '50%' :'Green': 'White' : 'Right' : 0 : 0);

Hope this helps you experiment with different flow layouts.
iPhone Portait
iPhone Portait
portrait.png (9.41 KiB) Viewed 4848 times
iPhone Landscape
iPhone Landscape
LandScape.png (16.42 KiB) Viewed 4848 times
Attachments
EXAM9999.TXT
Sample RPG Code
(3.45 KiB) Downloaded 454 times
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: Screen with multiple rows and columns (RPG)

Post by MarkDuignan »

This change:

// Row Col Height Width Backcolor TextColor Text RowSp ColSp

MakeCell (1 : 1 : '5%' : 'Fill' :'Blue' : 'White' : 'Top' : 0 : -1);

MakeCell (2 : 1 : 'Fill' : '20%' :'Red' : 'White' : 'Left' : 0 : 0);

MakeCell (2 : 2 : 'Fill' : '80%' :'Green': 'White' : 'Right' : 0 : 0);

produces this screen below.

Also see http://www.longrangemobile.com/docs/LRP ... anging.htm
iPad in Landscape mode
iPad in Landscape mode
iPadLandScape.png (14.3 KiB) Viewed 4844 times
Post Reply