Jump to content

Disabled unidbedit font color change


mehmet07

Recommended Posts

Hi,

 

If I understand you correctly..

Can you try this ?!:

 

1. UniServerModule.CustomCSS:

._x-item-disabled .x-form-field {
    opacity: 1;
    -moz-opacity: 1;
    filter: alpha(opacity=100);
    color: black;
    background: lime;
}

2. UniDBEdit->ClientEvents->UniEvents-> beforeInit fn:

function beforeInit(sender, config)
{
    config.disabledCls = "_x-item-disabled";
}

Best regards.

Link to comment
Share on other sites

  • 1 year later...

Hi,

 

If I understand you correctly..

Can you try this ?!:

 

1. UniServerModule.CustomCSS:

._x-item-disabled .x-form-field {
    opacity: 1;
    -moz-opacity: 1;
    filter: alpha(opacity=100);
    color: black;
    background: lime;
}

2. UniDBEdit->ClientEvents->UniEvents-> beforeInit fn:

function beforeInit(sender, config)
{
    config.disabledCls = "_x-item-disabled";
}

Best regards.

What could be incorrect?
The control is dynamically created
 
TUniDBEdit(ac).ClientEvents.UniEvents.Values['beforeInit'] := 'function beforeInit(sender, config) { config.disabledCls = "_x-item-disabled";}';

post-1670-0-98995000-1520010568_thumb.png

Link to comment
Share on other sites

  • 2 years later...
  • 2 years later...

Hello!

I use this topic, because my question is nearly the same.

I have a TUnimComboBox, which sometimes has "Enabled" set to false. With the solution above the fieldlabel is black as I want it (and not blur), but the text of the field is nevertheless blur. How can I prevent the text from getting blur, when the field is disabled?

Regards

Mike

Link to comment
Share on other sites

Hello,

11 minutes ago, likemike said:

I use this topic, because my question is nearly the same.

I have a TUnimComboBox, which sometimes has "Enabled" set to false. With the solution above the fieldlabel is black as I want it (and not blur), but the text of the field is nevertheless blur. How can I prevent the text from getting blur, when the field is disabled?

Screenshot?

Link to comment
Share on other sites

14 hours ago, likemike said:

I have a TUnimComboBox, which sometimes has "Enabled" set to false. With the solution above the fieldlabel is black as I want it (and not blur), but the text of the field is nevertheless blur. How can I prevent the text from getting blur, when the field is disabled?

Just use only this config:

procedure TMainmForm.UnimFormCreate(Sender: TObject);
begin
  UnimComboBox1.JSInterface.JSConfig('disabledCls', ['customDisabledCls']);
end;

 

Link to comment
Share on other sites

Just now, likemike said:

That doesn't work. Maybe I use the wrong CCS...

Hi,

8 hours ago, Sherzod said:

Just use only this config:

procedure TMainmForm.UnimFormCreate(Sender: TObject);
begin
  UnimComboBox1.JSInterface.JSConfig('disabledCls', ['customDisabledCls']);
end;

 

Delete this:

On 3/2/2018 at 10:09 PM, herculanojs said:
function beforeInit(sender, config)
{
    config.disabledCls = "_x-item-disabled";
}

 

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