|
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 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 be differ from variable name.
You can use some HTML tags to enrich tooltip representation. Have look into 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 after reload Microsoft Dynamics AX client only. List «Variables list» refreshed dynamically, therefore all changes become active immediately.
Tip: use «Variables list» to play with tooltips.
|