PlantScada - Startup/Timing issue for Theme_SetHilightColor when using custom theme

Hi,

In my startup script I've added following two lines for custom Theme setup:

//Project Theme settings
Theme_SetHeaderColor(5, 0); 
Theme_SetHilightColor(5, 1); 

Custom Theme 5 is set at "Standards ->Labels: _THEME_Default ->Expression = 5

It looks like there might be an timing issue with my startup script and the execution of FUNCTION Theme_SetTheme (INT nTheme) that again execute DspSetCurColor. 

1-2 runtime starts of 10, the array value for Theme_SetHilightColor is not set when function DspSetCurColor is executed, hence highlight color defaults to 0 and not my custom color 1. 

Appreciate any input,

Thanks

Rune

 

Parents
  • There is an internal start-up sequence that has a task to set up Theme, which may override your settings intermittently depending on timing of your start-up code. Try to execute Theme_SetHeaderColor(5, 0) and Theme_SetHilightColor(5, 1) on Page Entry or Page Shown event of your start-up or home page. Hope this would help.

Reply
  • There is an internal start-up sequence that has a task to set up Theme, which may override your settings intermittently depending on timing of your start-up code. Try to execute Theme_SetHeaderColor(5, 0) and Theme_SetHilightColor(5, 1) on Page Entry or Page Shown event of your start-up or home page. Hope this would help.

Children
No Data