Button Alignment

I have a button with a style that aligns text to left, an image and a text

In SmartClient you can see it very well, the image and then the text, but in WebClient the text is shown over the image.

Is there a trick to solve this?

Buttons with icons and text on them don’t behave that well in Web Client…

Something I’ve done in the past is to detect where the client is running and then “pad” the text of the button with " " (non-breaking spaces).

It’s definitely a HACK, but it works.

function foo(){
	if(application.getApplicationType() == APPLICATION_TYPES.WEB_CLIENT) {
		if(utils.stringLeft(elements.myButton.text,5) != " ") {
			elements.myButton.text = "    " + elements.myButton.text  //put as many spaces as you need
		}
	}
}

Thanks. I will do it that way