Hi there,
I am trying to use the following html on a button.
var html = "<html><table border=\"1\" width=\"100%\"><tr><td width=\"100%\">temp text asdas </td></tr></table></html>";
forms.test.elements.btn1.text = html;
But the html table never expands to 100% of the width of the button.
Please help!!
Thanks a lot.
Hi Hameed,
Just set the margin property of the label/button to 0,0,0,0 (top,left,bottom,right)
Hi Robert,
I have set the margins for the button as you stated. It did not solve my issue. The html table is not expanding to 100%
Please help!
Thanks!
I just put your HTML in a button and set the margin property to 0,0,0,0.
Works fine here.
Servoy Developer
Version R2 2.2.5-build 337
Java version 1.4.2-54 (Mac OS X)
my java version is as follows:
Servoy Developer
Version 3.0b3-build 364
Java version 1.5.0_07-b03 (Windows XP)
does it make any difference?
Hmm…I was mistaken.
When I made the button larger I see the same as you.
Only workaround I see is to set the width in pixels instead of percent.
This behavior is in Servoy 2.2.5 and 3.0b3 (Mac and Windows)
I can set the width in pixels for the buttons. The reason I wanted to set to 100% is because the size of the buttons are variable. I would like to set the table width to 100% and then show a small image on the right hand side of the button as shown in the attachment. Now it is shown in the left hand side which is a bit ugly.
Any other work around to acheive this would be better.
Thanks for your time.
I guess the following code would work.
<html><table>
<tr>
<td>your button name</td>
<td><img src="yourimage.png" alt=""></td>
</tr>
</table></html>
Also your HTML should be centered when your button has the showClick property enabled. Else use the horizontalAlignment property to center it.
Hope this helps.