PatW 18 Posted November 26, 2019 I was not able to change the color with this funciton(also SetStyle is not working) is there any trick or alternative function? Quote Share this post Link to post
Nicolas Goutte 81 Posted November 26, 2019 (edited) 2020 or 2019? Edited November 26, 2019 by Nicolas Goutte Quote Share this post Link to post
Stefan Bender 7 Posted November 26, 2019 I never used this function, but maybe the dialog is not yet displayed when you call the function? Does it fail on Mac and Windows or just on one platform? Does the control with the given ID actually exist and is it a static text control? Which RGB values are you passing? How did you initialize the CRGBColor? Check if your color has a valid color ref and check the RGB values. 1 Quote Share this post Link to post
Nicolas Goutte 81 Posted November 26, 2019 (edited) 18 minutes ago, Nicolas Goutte said: 2020 or 2019? Ich have checked in our code base. In 2019 VWStaticTextCtrl does not work with styles. In 2020 it was corrected. In 2019, you have to use ISDK::CreateStyleStaticText instead of ISDK:CreateStaticText (as VWStaticTextCtrl does) to been able to have style. Edited November 26, 2019 by Nicolas Goutte 1 Quote Share this post Link to post
PatW 18 Posted November 26, 2019 We are using VW2020. auto statTX = GetStaticTextCtrlByID(kedtitDim_EffLengthBasket); Uint8 R = 255; Uint8 G = 0; Uint8 B = 0; CRGBColor color(R, G, B); statTX->SetColor(color, false /*atDialogInitTime*/ ); I was calling this in DispatchEvent and OnUpdateUI without any effect. What we want is to make the static text red dynamically when a value is invalid. Quote Share this post Link to post
Nicolas Goutte 81 Posted November 26, 2019 We use the functions SetStyle and SetColor only when creating the controls. Quote Share this post Link to post
MullinRJ 203 Posted November 26, 2019 @PatW , This may be related to a bug I filed in May (for regular VectorScript, not SDK) – (VB-160901) VS SetStaticTextColor() does not work in VW 2020. StaticText color assignment works is VW 2019, but not VW 2020. It still shows to be unresolved. Raymond 1 Quote Share this post Link to post