# Background image not working properly in SmartClient

**URL:** <https://forum.servoy.com/t/background-image-not-working-properly-in-smartclient/12850>\
**Category:** Classic Servoy\
**Created:** [September 11, 2010, 10:25am UTC](https://forum.servoy.com/t/background-image-not-working-properly-in-smartclient/12850 "2010-09-11T10:25:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasantana](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jasantana](https://forum.servoy.com/u/jasantana)\
**Post date:** [September 11, 2010, 10:25am UTC](https://forum.servoy.com/t/background-image-not-working-properly-in-smartclient/12850/1 "2010-09-11T10:25:07Z")

</div>

Good morning from Gran Canaria,

I have a form with a label that has attached a StyleClass that have a background image property set.

In WebClient works properly, I can see the image as well as the text, but in SmartClient the image is shown but the text is not.

You can see a picture of what I mean.

Any clue?

 ![BackGroundProblem.png](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/2X/f/f361a8a91008a076871a8331ad1313af5f06c2fc.png)

---

<div class="post-metadata">

**Author:** ![Jan\_Blok](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@Jan\_Blok](https://forum.servoy.com/u/Jan_Blok)\
**Post date:** [September 13, 2010, 7:45am UTC](https://forum.servoy.com/t/background-image-not-working-properly-in-smartclient/12850/2 "2010-09-13T07:45:22Z")

</div>

Please [file](http://servoy.com/s) a support case with a small sample solution so we can check this out.

---

<div class="post-metadata">

**Author:** ![jasantana](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jasantana](https://forum.servoy.com/u/jasantana)\
**Post date:** [September 13, 2010, 6:34pm UTC](https://forum.servoy.com/t/background-image-not-working-properly-in-smartclient/12850/3 "2010-09-13T18:34:54Z")

</div>

Hi Jan,

As you asked me to do I opened a case and I´ve been answered that to get that I have to place to labels, one with the text and another with the background. So far so good, but how can I do the same with a button?

---

<div class="post-metadata">

**Author:** ![lvostinar](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/lvostinar/32/5248_2.png) [@lvostinar](https://forum.servoy.com/u/lvostinar)\
**Post date:** [September 17, 2010, 3:07pm UTC](https://forum.servoy.com/t/background-image-not-working-properly-in-smartclient/12850/4 "2010-09-17T15:07:45Z")

</div>

> jasantana:  
> Hi Jan,
> 
> As you asked me to do I opened a case and I´ve been answered that to get that I have to place to labels, one with the text and another with the background. So far so good, but how can I do the same with a button?

Why not set onAction on the label ? You want to have a background image on the button ?

---

<div class="post-metadata">

**Author:** ![jasantana](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jasantana](https://forum.servoy.com/u/jasantana)\
**Post date:** [September 17, 2010, 3:21pm UTC](https://forum.servoy.com/t/background-image-not-working-properly-in-smartclient/12850/5 "2010-09-17T15:21:00Z")

</div>

> Why not set onAction on the label ? You want to have a background image on the button ?

Thanks for your reply. As soon as I assign a method to the onAction event the label becomes a button. I mean it appereance changes like a button.

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [September 17, 2010, 3:22pm UTC](https://forum.servoy.com/t/background-image-not-working-properly-in-smartclient/12850/6 "2010-09-17T15:22:34Z")

</div>

turn of the property show click for that.
