Hello every one,
I want to add a border to a textfield, but I don't want to use a rectangle arround it, is there any way I can do it?
I found an attribute pen="Thin" but I can't make it work.
Please, can anyone help me?
Thanks
4 Answers:
Thanks for your reply, but I've found a way to do it using iReport. I'll explain it so if anyone has the same problem can solve it.
Select the text field and right click, In the context menu select padding and borders and assign a non zero value to the line width.
Thanks again for your reply.
hi dgiulian,
Please check out the code, you wrote that the pen stuff is not working with u, but this should work fine.
If it doesn't work then use 4 lines around the textfield, but this may give u problem when the text field is stretched dynamically. Just try out once.
Thanks.
Code: |
<textField> <reportElement x="291" y="0" width="128" height="20"/> <box topPadding="1" leftPadding="1" bottomPadding="1" rightPadding="1"> <topPen lineWidth="0.5" lineStyle="Solid"/> <leftPen lineWidth="0.5" lineStyle="Solid"/> <bottomPen lineWidth="0.5" lineStyle="Solid"/> <rightPen lineWidth="0.5" lineStyle="Solid"/> </box> <textElement textAlignment="Center"> <font size="12"/> </textElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$F{eid}]]></textFieldExpression> </textField></td></tr></tbody></table> |
Thanks, it helped me
This helped my issue...Thank you very much...
Thanks, it really saved my day