Hello,
I want to display programmaticaly a number from a variable in a text field of a widget.
The number should be displayed with only 2 digits.
I don't want to use global variables.
So, I use this:
setWidgetElementProperty("UWidget", "Text1", "text", {totalTrafic,numberformat,0.00});
I'm getting an error that a ; is missing.
What am I doing wrong?
Regards,
TC
Number Format Error
Moderator: Martin
- TheBrain1984
- Posts: 137
- Joined: 07 Aug 2013 08:17
- Location: Germany
Re: Number Format Error
try
setWidgetElementProperty("UWidget", "Text1", "text", "{totalTrafic,numberformat,0.00}");
Because you are using {} in a "code-element", that doesn't work. You can use {} as a kind of code declaration in a text-element so you need " .
setWidgetElementProperty("UWidget", "Text1", "text", "{totalTrafic,numberformat,0.00}");
Because you are using {} in a "code-element", that doesn't work. You can use {} as a kind of code declaration in a text-element so you need " .