Formatted text
a_riot42
Posts: 1,624
Does anyone know how to send the formatted text string to a touch panel button from code? Sending $P won't work obviously. Tech support wasn't sure.
Paul
Paul
0
Comments
Assign an address code to the button and do a text SEND_COMMAND using one or more of the formatting codes in the string.
I tried that and using send_command dvTP, "'^TXT-100,0,$P'" resulted in the the text $P showing up in the text field, not the precentage. Have you tried this? I haven't got it to work but perhaps I am doing something wrong. How does the TP know if the incoming string is a formatted code? I can't imagine it parses it for the codes and behaves accordingly but perhaps it does.
Paul
Might also be worth trying the old @TXT command rather than ^TXT
Send_Command dvTP "'@TXT,100,'$P'"
Are you using a bargraph button and not a multi-state bargraph button? If you are then I think that?s your problem even though you?re not doing anything wrong. I?ve used the multi-state bargraph buttons before and it works fine but I just tried it now with the simple bargaph and I?m seeing what you?re getting. So there appears to be a bug or the help file is wrong. Use the multi-state bargraph button instead if your application sees fit.
I am using a bargraph not a multistate bargraph. I will change it to a msbg and see if that works. Thanks!
EDIT: Yes it looks like the msbg is ok, but the regular bg doesn't work correctly unless that is by design.
Paul