Hi,
I would like to generate by code text of tooltip on webvisu (information wich appear when mouse is on element).
tooltip have to be composed like:
fixed text + text1 from textlist 1 + fixed text + text2 from textlist2
I want to create function block to do that a lot of time on webvisu with 2 entries:
- id of text1 (INT)
- id if text2 (INT)
and the result was the text to display on tooltip.
Could you help me to do that?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I created a function block, all on Tooltip variable:
FUNCTION BLOCK Tooltip_Information : STRING (255);
VAR_INPUT
id1: UNIT;
id2: UNIT;
END_VAR
VAR
sTextId : STRING;
sTextList : STRING;
temp1: STRING;
temp2: STRING;
END_VAR
Hi,
I would like to generate by code text of tooltip on webvisu (information wich appear when mouse is on element).
tooltip have to be composed like:
fixed text + text1 from textlist 1 + fixed text + text2 from textlist2
I want to create function block to do that a lot of time on webvisu with 2 entries:
- id of text1 (INT)
- id if text2 (INT)
and the result was the text to display on tooltip.
Could you help me to do that?
Hi. You can do it with TextListUtils library.
https://help.codesys.com/webapp/idx-TextListUtils-lib;product=TextListUtils;version=3.5.16.0
I created a function block, all on Tooltip variable:
FUNCTION BLOCK Tooltip_Information : STRING (255);
VAR_INPUT
id1: UNIT;
id2: UNIT;
END_VAR
VAR
sTextId : STRING;
sTextList : STRING;
temp1: STRING;
temp2: STRING;
END_VAR
sTextList := 'my_list_1';
sTextId := UINT_TO_STRING(id1);
temp1:= VisuElems.cmpDynamictext.DynamicTextGetDefaultText (ADR(sTextList), ADR(sTextId))^;
sTextList := 'my_list_2';
sTextId := UINT_TO_STRING(id2);
temp2:= VisuElems.cmpDynamictext.DynamicTextGetDefaultText (ADR(sTextList), ADR(sTextId))^;
Tooltip_Information:=CONCAT(STR1:='fixed_text1', STR2:=temp1);
Tooltip_Information:=CONCAT(STR1:=Tooltip_Information, STR2:='fixed_text2');
Tooltip_Information:=CONCAT(STR1:=Tooltip_Information, STR2:=temp2);
It work fimaximum number of character on tooltip element ?