Eugeniusz Rink Posted August 31, 2020 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
Sherzod Posted August 31, 2020 Posted August 31, 2020 Hello, For which component? UnimPanel, UnimEdit? Quote
Eugeniusz Rink Posted August 31, 2020 Author Posted August 31, 2020 When I enter UnimEdit I want to change the UniPanel border. Quote
Sherzod Posted August 31, 2020 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
Eugeniusz Rink Posted August 31, 2020 Author Posted August 31, 2020 Thank you Sherzod for your help. The error is gone but the border color does not change ;-( Quote
Sherzod Posted August 31, 2020 Posted August 31, 2020 Which theme are you using? Can you make a simple testcase? Quote
Eugeniusz Rink Posted August 31, 2020 Author 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
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.