Jump to content

Recommended Posts

Posted

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:

image.png.2568cea83f2247ec4127b8ac50403a55.png

What am I doing wrong?

 

Posted
procedure TMainmForm.UnimEdit1Enter(Sender: TObject);
begin
  with UnimPanel1.JSInterface do
    JSCall('bodyElement.dom.style.setProperty', ['border-color', uniColor2Web(clGreen), 'important']);
end;

 

Posted

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 ;-)

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...