javascript - Dojo JS ToggleButton show as enabled but disallow click/toggle and hover outline -


i need use togglebutton show image , text , want button appear enabled (colored icon , black text), not want allow click/toggle happen right functionality come later. again need icon colored , text black button not clickable (basically should not button, no outline when hover, etc).

this.button = new togglebutton({                          "id": title,                          "label": count,                          "showlabel": true,                          "iconclass": "eicon",                          "class": "buttontext",                          "disabled": true,                  }); 

i cannot css work - tried put color button in css this:

.itpbuttontext { color: black !important; } 

but never gets picked up. maybe need reverse, allow enabled, not allow hover or clicked?

does have suggestions?

first, there particular reason need use togglebutton implement this? actually, easy use 2 divs (one img class, text) implement same effect want achieve, need keep status , based on status, style them accordingly.

if still need use togglebutton, can try overwrite default styles of togglebutton particular button. use inspector corresponding class name need change, search them in theme css file, overrite them in own css file.

for example, overwrite hover behaviors, may need overwrit

.claro .dijittogglebuttonhover .dijitbuttonnode {   background-color: #86bdf2;   color: #000000;   -webkit-transition-duration: 0.2s;   -moz-transition-duration: 0.2s;   transition-duration: 0.2s; } 

with

.yourclass .claro  .dijittogglebuttonhover .dijitbuttonnode {    /* styles */  } 

but may need lot of kind of overwrite, maybe better create customize button using first method.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -