newsanti Posted September 25, 2023 Share Posted September 25, 2023 TunimEdit... type TdummyUniFormControl = class(TUniFormControl); ... var oControlX:= TdummyUniFormControl(oControl); if oNeuron.CheckError then begin oControlX.FieldLabelFont.Color:= FormLinkOptions.LabelErrorColor; oControlX.FieldLabel:= oNeuron.DisplayLabel; end not working. (FieldLabel color not change.) Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 25, 2023 Share Posted September 25, 2023 1 hour ago, newsanti said: oControlX.FieldLabelFont.Color:= FormLinkOptions.LabelErrorColor; Can you please clarify? Quote Link to comment Share on other sites More sharing options...
newsanti Posted September 25, 2023 Author Share Posted September 25, 2023 2 hours ago, Sherzod said: Can you please clarify? if ValidateOK then unimEdit1.FieldLabelFont.Color:= clWindowText else unimEdit1.FieldLabelFont.Color:= clRed. it not work because client fieldLabel do not change display to clred . Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 25, 2023 Share Posted September 25, 2023 22 minutes ago, newsanti said: if ValidateOK then unimEdit1.FieldLabelFont.Color:= clWindowText else unimEdit1.FieldLabelFont.Color:= clRed. Try this approach: if ValidateOK then UnimEdit1.FieldLabelFont.Color:= clWindowText else UnimEdit1.FieldLabelFont.Color:= clRed; UnimEdit1.JSInterface.JSCall('labelElement.applyStyles', [UnimEdit1.FieldLabelFont.ToString(True)]); //<----------------- Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 25, 2023 Share Posted September 25, 2023 Use this: UnimEdit1.JSInterface.JSCall('labelElement.applyStyles', [UnimEdit1.FieldLabelFont.ToStyleString(True)]); 1 Quote Link to comment Share on other sites More sharing options...
newsanti Posted September 25, 2023 Author Share Posted September 25, 2023 7 minutes ago, Sherzod said: Use this: UnimEdit1.JSInterface.JSCall('labelElement.applyStyles', [UnimEdit1.FieldLabelFont.ToStyleString(True)]); Work Perfected. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.