Hi,
I am using powerview 2.8 and I believe I found an issue related to the text widget formatting. I drop a "Text Widget - Indirect" on a page with some random text,and I format it to be left aligned. Whenever I change this text via a script (e.g. setTextWidgetText(ScreenObjectIDs.test_1,"Alarm Communication Failure"); ), the formatting gets lost and text gets aligned to the center position.
Can anyone else confirm this?
Formatting on a text widget
- nunoalves
- Posts: 9
- Joined: Fri Aug 31, 2012 10:36 am
- nunoalves
- Posts: 9
- Joined: Fri Aug 31, 2012 10:36 am
Re: Formatting on a text widget
Also,
I am deploying the code on the new PV780 using powerview 2.8.
I have noticed that whenever I change the font size on a "Text Widget - Indirect" to something other than the default font size 20, whenever I modify the "Text Widget - Indirect" text via a script, the displayed text gets corrupted.
Check the attached photo I took of a PV780 LCD running a test application. In the first four lines, I am basically typing the same string four times with a different line number. The first "Text Widget - Indirect" has the default font type and default size of 20, the second "text widget" has the default type with font size of 15 and the third "text widget" has the default type with font size of 25. The fourth "text widget" once again has the default font type and default size of 20.
setTextWidgetText(gFaultDisp_ObjID_Arry[gFaultDisp_Idx],(gFaultDisp_Idx+1)+": Alarm Communication Failure");
gFaultDisp_Idx++;
setTextWidgetText(gFaultDisp_ObjID_Arry[gFaultDisp_Idx],(gFaultDisp_Idx+1)+": Alarm Communication Failure");
gFaultDisp_Idx++;
setTextWidgetText(gFaultDisp_ObjID_Arry[gFaultDisp_Idx],(gFaultDisp_Idx+1)+": Alarm Communication Failure");
gFaultDisp_Idx++;
setTextWidgetText(gFaultDisp_ObjID_Arry[gFaultDisp_Idx],(gFaultDisp_Idx+1)+": Alarm Communication Failure");
gFaultDisp_Idx++;
Can someone else also confirm this? What is going on here? We definitely did not have any of these issues with powerview 2.3 on the PV750s.
I am deploying the code on the new PV780 using powerview 2.8.
I have noticed that whenever I change the font size on a "Text Widget - Indirect" to something other than the default font size 20, whenever I modify the "Text Widget - Indirect" text via a script, the displayed text gets corrupted.
Check the attached photo I took of a PV780 LCD running a test application. In the first four lines, I am basically typing the same string four times with a different line number. The first "Text Widget - Indirect" has the default font type and default size of 20, the second "text widget" has the default type with font size of 15 and the third "text widget" has the default type with font size of 25. The fourth "text widget" once again has the default font type and default size of 20.
setTextWidgetText(gFaultDisp_ObjID_Arry[gFaultDisp_Idx],(gFaultDisp_Idx+1)+": Alarm Communication Failure");
gFaultDisp_Idx++;
setTextWidgetText(gFaultDisp_ObjID_Arry[gFaultDisp_Idx],(gFaultDisp_Idx+1)+": Alarm Communication Failure");
gFaultDisp_Idx++;
setTextWidgetText(gFaultDisp_ObjID_Arry[gFaultDisp_Idx],(gFaultDisp_Idx+1)+": Alarm Communication Failure");
gFaultDisp_Idx++;
setTextWidgetText(gFaultDisp_ObjID_Arry[gFaultDisp_Idx],(gFaultDisp_Idx+1)+": Alarm Communication Failure");
gFaultDisp_Idx++;
Can someone else also confirm this? What is going on here? We definitely did not have any of these issues with powerview 2.3 on the PV750s.
- Attachments
-
- IMG_0379.jpg (543.59 KiB) Viewed 106 times
- stalley
- Enovation Controls Development
- Posts: 618
- Joined: Tue Mar 18, 2014 12:57 pm
Re: Formatting on a text widget
Hello nunoalves,
The text widgets have changed since 2.3. There is only one Text Widget type, Text Widget - Multilanguage.
In Page Designer, if you select a Text Widget to view the properties, you can select the button in the lower right to show hidden properties to see everything.
The setTextWidgetText() has been deprecated.
In scripting, you will need to use the following methods,
Please let us know if you find you are still having issues after you update your config. If you are porting a 2.3 configuration into 2.8, it is possible you may run in to more conversion issues.
The text widgets have changed since 2.3. There is only one Text Widget type, Text Widget - Multilanguage.
In Page Designer, if you select a Text Widget to view the properties, you can select the button in the lower right to show hidden properties to see everything.
The setTextWidgetText() has been deprecated.
In scripting, you will need to use the following methods,
- uInt cultureGetString( uint reservedStringID, ref string outputString, int versionToReturn )
void cultureSetString( uint reservedStringID, ref string inputString, bool allLanguages )
Please let us know if you find you are still having issues after you update your config. If you are porting a 2.3 configuration into 2.8, it is possible you may run in to more conversion issues.
Sara Talley
Software Engineer
Enovation Controls
Software Engineer
Enovation Controls
- nunoalves
- Posts: 9
- Joined: Fri Aug 31, 2012 10:36 am
Re: Formatting on a text widget
So, I need to allocate a String Variable that is associated for each different Text Widget - Multi Language... and I cant directly change the text of a "Text Widget - Multi Language" screen object?
- stalley
- Enovation Controls Development
- Posts: 618
- Joined: Tue Mar 18, 2014 12:57 pm
Re: Formatting on a text widget
You are correct.
We change the String Variable data, similar to changing values of a Numerical variable.
We change the String Variable data, similar to changing values of a Numerical variable.
Sara Talley
Software Engineer
Enovation Controls
Software Engineer
Enovation Controls