Jump to content

Change the Background color of TUniMenuButton


bahry

Recommended Posts

Hi,

Am trying to change the background color of "TUniMenuButton" without success I've seen the following link


and I have made the same steps

 

the name of the control is btnTest

in the 

ExtEvents:

 function added(sender, container, pos, eOpts)

{

  sender.addCls('bntTest');


in the 

UniEvents:

function beforeInit(sender, config)

{

  config.cls="bntTest";

}

in ServerModule 

CustomCSS:

 

.bntTest

{

 background:#1892d1 !important;

 color:#fff !important;

 -webkit-transition: background 0.5s ease-in-out;

 transition: background 0.5s ease-in-out;

}

.bntTest:hover

{

 background:#828282 !important;

 -webkit-transition: background 0.5s ease-in-out;

 transition: background 0.5s ease-in-out;

}

 

Is the above code correct or do I have to make any changes.

 

Regards

 

 

 

Link to comment
Share on other sites

Hi,

 

Sorry, Can you clarify your question again please?! Maybe I didn't quite understand your question, because the code above works fine for me

I copied the same code to a new project with default theme and it works fine, but if I change the theme to lets say win 10 it will not work the background color will take the theme color.

 

Regards

Link to comment
Share on other sites

the project: http://3msoft.net/mhmd/Jordan.rar

 

Here is a working project (with .exe), but I don't know why you want to change default theme of the button, I recommended to let framework manage that :-)

 

Sencha Extjs / Touch has a built in themes and it's cross-browser, they already did the hard work for us, so we can focus in back-end and leave the front-end to the framework to manage...

 

Link to comment
Share on other sites

the project: http://3msoft.net/mhmd/Jordan.rar

 

Here is a working project (with .exe), but I don't know why you want to change default theme of the button, I recommended to let framework manage that :-)

 

Sencha Extjs / Touch has a built in themes and it's cross-browser, they already did the hard work for us, so we can focus in back-end and leave the front-end to the framework to manage...

 

Dear Mohammad,

Thanks a lot, I appreciate your help.

 

Regards

Bahry

Link to comment
Share on other sites

  • 2 years later...
On 1/16/2017 at 4:09 PM, mhmda said:

the project: http://3msoft.net/mhmd/Jordan.rar

 

Here is a working project (with .exe), but I don't know why you want to change default theme of the button, I recommended to let framework manage that :-)

 

Sencha Extjs / Touch has a built in themes and it's cross-browser, they already did the hard work for us, so we can focus in back-end and leave the front-end to the framework to manage...

 

hi, not access to file for download ,,,

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