Jump to content

uniBitBtn Font Color


mikromundo

Recommended Posts

Hi,

I take this CSS:

.x-btn .x-btn-inner {
  color: gray !important;
}

.x-btn-over .x-btn-inner {
  color: black !important;
}

It changes all buttons.

How can I apply only to a specific button?
I tried a few ways and failed.
I couldn't identify what I'm doing wrong.

 

Link to comment
Share on other sites

Hi,

Can you try this?

 

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  with UniBitBtn1, JSInterface do
  begin
    JSCallGlobal('Ext.util.CSS.createStyleSheet',
                  ['#' + JSId +'.x-btn .x-btn-inner { color: gray !important;}',
                  JSName + '_css1']);
    JSCallGlobal('Ext.util.CSS.createStyleSheet',
                  ['#' + JSId +'.x-btn-over .x-btn-inner { color: black !important;}',
                  JSName + '_css2']);
  end;
end;

And don't forget to destroy them.

procedure TMainForm.UniFormDestroy(Sender: TObject);
begin
  with UniBitBtn1, JSInterface do
  begin
    JSCallGlobal( 'Ext.util.CSS.removeStyleSheet',[JSName + '_css1']);
    JSCallGlobal( 'Ext.util.CSS.removeStyleSheet',[JSName + '_css2']);
  end;
end;

 

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