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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...