|
How to
How to customize tooltips
DEV_AxAssistTooltips class used for tooltip processing.
Description of the class DEV_AxAssistTooltips.
Methods:
Tooltips for classes:
static str getClassToolTip(DictClass dictClass, boolean isVariable);
Tooltips for extended data types (EDT):
static str getEDTToolTip(DictType dictType, boolean isVariable);
Tooltips for enums:
static str getEnumToolTip(DictEnum dictEnum, boolean isVariable);
Tooltip for enums (of type ItemType::Item):
static str getEnumValToolTip(DictEnum dictEnum, int idx);
Tooltip for table field:
static str getTableFieldToolTip(DictTable dictTable, DictField dictField);
Tooltip for tables, maps and views:
static str getTableToolTip(DictTable dictTable, boolean isVariable);
Each of methods return tooltip as a string. To change tooltip it is necessary to change return value within corresponding method.
Variable isVariable is true, if tooltip is defined for variable, not for AOT element (e.g. class variable). For example, in this case it is usefully to show variable type, because it might differ from variable name.
You can use some HTML tags to enrich tooltip representation. Take a look at the sample:
Tooltip definition (returning value):
str strTip;
;
strTip += "<p align=right> Right" ;
strTip += "<p align=center> Center</center>" ;
strTip += "<b>bold</b><br>" ;
strTip += "<i>italic</i><br>" ;
strTip += "<u>underline</u><br>" ;
strTip += "<i><b>bold+italic</b></i>" ;
strTip += "<ul><li> FirstListItem<li> SecondListItem</ul>" ;
strTip += "<font color=#FF0000> red color</font><br>" ;
strTip += "<font color=#00FF00> green color</font><br>" ;
Tip: use <br> tag instead of “/r/n”.
Tooltip will be presented as shown below:

Take into account that if you change logic of tooltips, then tooltips for «Name Matching» and «Acronyms» lists will be changed only after reloading Microsoft Dynamics AX client. List «Variables list» refreshes dynamically, therefore all changes become active immediately.
Tip: use «Variables list» to play with tooltips.
|