Trouble displaying text in a TextWidget

Discuss issues and ideas you have to configuring displays with PowerVision
IsaPaine
Posts: 1
Joined: Tue Nov 15, 2011 7:26 am

Trouble displaying text in a TextWidget

Post by IsaPaine » Mon Nov 21, 2011 10:53 am

I'm a newbie.
This event is called from a PV450 Key Press 1 down event.
void $MyNameIsSmiley$()
{
string sTextTesting = "Hello world";
setTextWidgetText(ScreenObjectIDs.txtSampleChange,sTextTesting);
}
txtSampleChange is a TextWidget MultiLanguage.
The event was created for this script.
It compiles fine.
It never displays on screen, when I press the button.

Thx in advance.

Isa
ksaenz
Enovation Controls Development
Enovation Controls Development
Posts: 263
Joined: Thu Aug 19, 2010 7:53 am

Re: Trouble displaying text in a TextWidget

Post by ksaenz » Mon Nov 21, 2011 11:04 am

Hello Isa,

After calling the setTextWidgetText() function also call processScreenApi().

Make your text widget a "dynamic" object.

If you are using version 2.3 of the PowerVision Configuration Studio the preferred method to change text on the screen is cultureSetString().

I attached a configuration I made to test the function. The script and events are in the group "Strings"

Let me know if you have more questions.

Regards,

ksaenz
Attachments
Strings.zip
Created with PVCS 2.3.11147
(115.02 KiB) Downloaded 28 times