Jump to content

Color


rtalmeida

Recommended Posts

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?

Link to comment
Share on other sites

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,

Link to comment
Share on other sites

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,

Link to comment
Share on other sites

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...