Eugeniusz Rink Posted August 31, 2020 Share Posted August 31, 2020 Hello... I used this code: procedure TMainmForm.UnimEdit2Enter(Sender: TObject); begin with UnimPanel4.JSInterface do JSCall('inputEl.dom.style.setProperty', ['border-color', uniColor2Web(clGreen)]); end; When I enter UnimEdit2 I get this error: What am I doing wrong? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 31, 2020 Share Posted August 31, 2020 Hello, For which component? UnimPanel, UnimEdit? Quote Link to comment Share on other sites More sharing options...
Eugeniusz Rink Posted August 31, 2020 Author Share Posted August 31, 2020 When I enter UnimEdit I want to change the UniPanel border. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 31, 2020 Share Posted August 31, 2020 procedure TMainmForm.UnimEdit1Enter(Sender: TObject); begin with UnimPanel1.JSInterface do JSCall('bodyElement.dom.style.setProperty', ['border-color', uniColor2Web(clGreen), 'important']); end; Quote Link to comment Share on other sites More sharing options...
Eugeniusz Rink Posted August 31, 2020 Author Share Posted August 31, 2020 Thank you Sherzod for your help. The error is gone but the border color does not change ;-( Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 31, 2020 Share Posted August 31, 2020 Didn't forget to add: important? Quote Link to comment Share on other sites More sharing options...
Eugeniusz Rink Posted August 31, 2020 Author Share Posted August 31, 2020 No. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 31, 2020 Share Posted August 31, 2020 Which theme are you using? Can you make a simple testcase? Quote Link to comment Share on other sites More sharing options...
Eugeniusz Rink Posted August 31, 2020 Author Share Posted August 31, 2020 Quote Link to comment Share on other sites More sharing options...
Eugeniusz Rink Posted August 31, 2020 Author Share Posted August 31, 2020 Ok... I solved the problem by changing the CSS procedure TMainmForm.UnimEdit2Enter(Sender: TObject); begin UnimEdit2.JSInterface.JSCall('addCls', ['_Password']); end; procedure TMainmForm.UnimEdit2Exit(Sender: TObject); begin UnimEdit2.JSInterface.JSCall('removeCls', ['_Password']); end; Probably not a very nice solution, but it works ;-) 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.