Jump to content

How set CSS properties uniControl


irigsoft

Recommended Posts

Hi,

I must create customCSS with static coloring rules.

I read some examples on forum, but:

1. All use addcls on delphi code, I dont want that

2. How can use uniControl Delphi  name, like UniButtomMyColoringButton, uniPanel_MyColorPanel

 

UniGui Edition: Profesional v1421

Link to comment
Share on other sites

Tanks,

I try this :

1. Create dinamically forms and components

2. In Customcss use name 

.TBitBtn1 {border-radius:10px;
    background-color: rgb(211,235,225) !important;
    border: 1px solid rgb(142,28,36); }
 
and no change applied
May be I wrong with addressing by name
Link to comment
Share on other sites

I want to use Delphi name, my button's name is uniBtnClose

Just put this on customcss and no efect.

".uniBtnClose {border-radius:5px;

    background-color: #fefbd8;
    color: #fefbd2;

    border: 1px solid rgb(142,28,36); }"

 

but if use on form.create: "uniBtnClose.JSInterface.JSCall('addCls', [uniBtnClose.Name]);" it work

 

My question is: how to use Delphi name "uniBtnClose" in customcss ?

Link to comment
Share on other sites

If I understand correctly you, you can try to use this approach:

 

For example for UniButton1:

 

1. UniButton1 -> ClientEvents -> ExtEvents -> function afterrender:

function afterrender(sender, eOpts)
{
    var me=sender;
    me.el.dom.setAttribute('name', me.uname);
}

2. CustomCSS:

a[name="UniButton1"] .x-btn-inner {
    font-size: 12px;
    color: green;
    font-weight: bold;
}
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...