Please mark posts as being for RPG or RDMLX (LANSA) developers.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
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.
http://www.longrangemobile.com/docs/lan ... colors.htm
Note: Changing the background colors of LongRange Table headers will remove the color gradient effect that is visable on default headers.
- LongRange Table with Colored Headers
- LongRange_Table _with_Colored_Headers.PNG (117.11 KiB) Viewed 10076 times
- Posts: 5
- Joined: Tue Mar 18, 2014 6:20 pm
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.
The background color of table headers in a LongRange app. can be set using /SysStates property, TableHeaderBackColor
http://www.longrangemobile.com/docs/lan ... 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.
- Posts: 45
- Joined: Wed Oct 17, 2012 4:19 am
What do you mean by "a local object generator program"?
- Posts: 346
- Joined: Wed Apr 18, 2012 10:33 am
See http://www.longrangemobile.com/docs/LRS ... 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.