Jump to content

TUniImage mouse over


WagnerAlexandre

Recommended Posts

TUniImage->ClientEvents->ExtEvents:

 

function Onmouseout(sender)
{
sender.getEl().setStyle("background-image","url(Files/mouseout.png)");

}

 

function Onmouseover(sender)
{
sender.getEl().setStyle("background-image","url(Files/mouseover.png)");

}

Link to comment
Share on other sites

  • 1 year later...

It seems that this issue don't work.

 

If you set an TuniImage with url property.

 

So i try with css :

.ribbon-btn
{
  background-image: url('./assets/images/Ribbon.png');
  background-repeat: no-repeat;
}

.ribbon-btn:hover
{
  background-image: url('./assets/images/Ribbon_MO.png');
  background-repeat: no-repeat;
}

+

RibbonBtn.JSInterface.JSConfig('cls',['ribbon-btn']);

but with same result.

the url was defined on url property of unimage is foreground and it mask the image of css.

 

If i don't define url and If i analyze we can see the html source code define backgound to none so the css can't be applied.

<div class="x-component ribbon-btn x-abs-layout-item x-component-default" style="background:none;clip:rect(0px,45px,40px,0px);left:0px;top:0px;width:45px;height:40px;" id="O130_id">
</div>

Have you got a solution please

Link to comment
Share on other sites

issue :

For UniImage , not set url property.

and for css add important!

.ribbon-btn
{
  background-image: url('./assets/images/Ribbon.png') !important;
  background-repeat: no-repeat !important;
}

.ribbon-btn:hover
{
  background-image: url('./assets/images/Ribbon_MO.png') !important;
  background-repeat: no-repeat !important;
}

+

RibbonBtn.JSInterface.JSConfig('cls',['ribbon-btn']); 

Thanks Delphi Dev

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