Enbling a Border on an Image

I have been trying to enable a border on an image but I’m messing up either the syntax or the property call, I can diable the border easy but I am unable to add one back. Does anyone have any examples of enabling and disabling a border on an image based on a mouse over? Thanks


Take a look at this. It may help.


What you can also do is:

On the mouseExited event of the original image

event.source.border = None

Create another image or component and set the border to whatever you want.
Keep this image/component invisible.

On the mouseEntered event of the original image

event.source.border = event.source.parent.getComponent('defBorder').border

I’m sure there are other ways to accomplish this.

Thanks, I have the None working but i would prefer not to have multiple images and hide/unhide them if possible. I saw in the previous post about there is an expression toBorder, ill check that out

So I used toBorder and a custom property, the mouse over and exit set the custom property to 1 and 0 respectively and then i used an expression binding to set the border.

if({Root Container.Image.borderStyle} = 1, toBorder(“bevel;1010”), toBorder(none))

Thanks for the help guys