Page 1 of 1

(RDMLX) Changing Table Header Colors

Posted: Mon Jul 29, 2013 12:00 pm
by Paul
You can change the Font color and background color of table column headers without affecting the body of the table.

Concider the shipped LANSA example LREX004 - Using Tables. As shipped the font color of the headers are already changed to blue but if you modify the code setting up the headers to the following, the background color of the headers can be changes as well.

Code: Select all

* Set up Colunm Headers

#COM_OWNER.Set_Label Name('Table1.Col%1.HEADER') Text('Name') Color(Red) Backcolor(Yellow)
#COM_OWNER.Set_Label Name('Table1.Col%2.HEADER') Text('Phone') Color(Blue) Backcolor(Yellow)
#COM_OWNER.Set_Label Name('Table1.Col%3.HEADER') Text('Address') Color(Blue) Backcolor(Yellow)
#COM_OWNER.Set_Label Name('Table1.Col%4.HEADER') Text('Start Date') Color(Blue) Backcolor(Yellow)
#COM_OWNER.Set_Label Name('Table1.Col%5.HEADER') Text('Gender') Color(Blue) Backcolor(Yellow)

See the 'Specifying Colors' section in the 'Programming longRange with LANSA' guide for more information on using colors. ... colors.htm

Note: Changing the background colors of LongRange Table headers will remove the color gradient effect that is visable on default headers.

Re: (RDMLX) Changing Table Header Colors

Posted: Tue Sep 02, 2014 9:27 pm
by Pat
Is there any way I can change the background colour of the header row as opposed to the individual column headers? On iOS7 it's appearing as a standard Apple light blue I think.

Re: (RDMLX) Changing Table Header Colors

Posted: Wed Sep 03, 2014 9:25 am
by Paul
The background color of table headers in a LongRange app. can be set using /SysStates property, TableHeaderBackColor. ... interf.htm

An example of setting this property in RDMLX code would be..

Code: Select all

#COM_OWNER.Set Property('/SysStates.TableHeaderBackColor') To(White)
This is a global change that effects all tables in the LongRange application.

Note that changes to Table header background color are best made in a local object generator program because the schema needs to be refreashed before changes take effect.

Re: (RDMLX) Changing Table Header Colors

Posted: Thu Sep 04, 2014 11:20 pm
by kno_dk
What do you mean by "a local object generator program"?

Re: (RDMLX) Changing Table Header Colors

Posted: Fri Sep 05, 2014 8:36 am
by MarkDuignan
See ... ttings.htm for how and where a Local Object Generator program is specified in your schema.

It is a program you write that is called whenever a schema is loaded or refreshed.

It is often used to send commonly used images and other resources up to the device’s resource folder or to (re)load local data base tables with relatively static data (eg: a local table of US states used to locally fill drop downs from).

It can also be used to set up global application configuration details – such as the table header colors, the menu bar colors, whether the menu bar appears, etc, etc.