rtalmeida Posted May 9, 2017 Share Posted May 9, 2017 In some components does the color property not work? For example in a UniEdit component I do in the OnEnter CompName.Color: = clInfoBk; And it changes color but in components like: TUniNumberEdit and TUniDateTimePicker and TUniComboBox does not work, how can I proceed? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 10, 2017 Share Posted May 10, 2017 Hi, In some components does the color property not work? For example in a UniEdit component I do in the OnEnter CompName.Color: = clInfoBk; And it changes color but in components like: TUniNumberEdit and TUniDateTimePicker and TUniComboBox does not work, how can I proceed? I couldn't reproduce your issue. Can you clarify ? Which build are you using ?! Best regards, Quote Link to comment Share on other sites More sharing options...
rtalmeida Posted May 10, 2017 Author Share Posted May 10, 2017 I noticed that if using the default theme the problem does not occur, it is occurring on the theme I chose for my system which is: uni_mac color.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 10, 2017 Share Posted May 10, 2017 yes I see now this issue for UniDateTimePicker, UniComboBox1 Quote Link to comment Share on other sites More sharing options...
rtalmeida Posted May 11, 2017 Author Share Posted May 11, 2017 But is there a solution? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 11, 2017 Share Posted May 11, 2017 But is there a solution? Hi, I will try to give you a solution a bit later. Best regards, Quote Link to comment Share on other sites More sharing options...
rtalmeida Posted May 11, 2017 Author Share Posted May 11, 2017 Thanks again! Quote Link to comment Share on other sites More sharing options...
rtalmeida Posted May 13, 2017 Author Share Posted May 13, 2017 ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 13, 2017 Share Posted May 13, 2017 Hi, The reason for this is in the global css, in which the background is declared as important Best regards, Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 13, 2017 Share Posted May 13, 2017 We will give you a solution Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 13, 2017 Share Posted May 13, 2017 Hi, One of the possible solutions for now, try... For example for UniComboBox1: 1. uses ... uniGUIJSUtils; 2. procedure TMainForm.UniComboBox1Enter(Sender: TObject); begin //UniComboBox1.color := clred; with UniComboBox1.JSInterface do JSCall('inputEl.dom.style.setProperty', ['background', uniColor2Web(clRed), 'important']); end; procedure TMainForm.UniComboBox1Exit(Sender: TObject); begin //UniComboBox1.color := clWindow; with UniComboBox1.JSInterface do JSCall('inputEl.dom.style.setProperty', ['background', uniColor2Web(clWindow), 'important']); end; Best regards, Quote Link to comment Share on other sites More sharing options...
rtalmeida Posted May 14, 2017 Author Share Posted May 14, 2017 Solved, thank you 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.