IBM Support

Setting Label Text Properties

Question & Answer


Question

In the UI presentation framework there is a property – ‘labelcss’ – that is not exposed on the Control Properties dialog for any control but can be used by entering it directly in the xml or in a conditional configuration.

Answer

The labelcss attribute can be applied to any control with a ‘label’ property. Multiple valid values can be entered separated by spaces for example ‘txtred txtbold’ to make the text red and bold. Changes may not render the same everywhere in Maximo. This is due to the nature of css files and may differ based on how the cascade properties are set in the other css files to drive the control behavior.

You would need to add the csslabel attribute to the XML Manually after exporting the XML file and once the changes have been made, reimport the XML file using App Designer.
From the Go To menu select App Designer.
Select the application you want to modify.
Select the Export toolbar icon.
Save the XML file as a backup and make a copy to modify.
Open the XML file with a text editor and find the line of code for the label you wish to modify.
Ex.
<tablecol id="results_showlist_tablebody_8" dataattribute="islinear" linkedcontrolid="qbe_grid2_1_1_islinear" licensekey="LINEAR" />
You would add one or more labelcss attributes so that the modified line would look like:
<tablecol id="results_showlist_tablebody_8" dataattribute="islinear" linkedcontrolid="qbe_grid2_1_1_islinear" licensekey="LINEAR" labelcss="txtred"/>
Save the XML file after the changes, you will need to import the XML file for the changes to take effect.
Back in App Designer, select the Import toolbar option and browse to your modified file and import it.

Valid values for labelcss property :

txtred
txtgreen
txtdarkgreen
txtblue
txtdarkblue
txtmaroon
txtpurple
txtorange
txtyellow
txtgray
txtbold bold text
txtitalic italic text
txtstrike strike through text
txtuppercase UPPER CASE TEXT
txtlowercase lower case text

[{"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.1;7.1.1;7.5;7.6","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}},{"Product":{"code":"SSLKTY","label":"Maximo Asset Management for IT"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"","label":"All"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}},{"Product":{"code":"SSWK4A","label":"Maximo Asset Management Essentials"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":null,"Platform":[{"code":"","label":"All"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
13 April 2021

UID

swg21303187