dgiulian Posted July 22, 2009 Share Posted July 22, 2009 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 Link to comment Share on other sites More sharing options...
k1234 Posted July 23, 2009 Share Posted July 23, 2009 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> Link to comment Share on other sites More sharing options...
dgiulian Posted July 23, 2009 Author Share Posted July 23, 2009 Thanks for your replyI tried that code, and it worked but now the box cover the text, so I can't see the values of the textfield, How can I make it transparent?Another thing, is there any way I can do it using iReport?Again, Thanks Link to comment Share on other sites More sharing options...
k1234 Posted July 24, 2009 Share Posted July 24, 2009 Can u attach the jrxml file, i am not clear about your problem in report. Post Edited by k1234 at 07/24/2009 06:22 Link to comment Share on other sites More sharing options...
Solution dgiulian Posted July 24, 2009 Author Solution Share Posted July 24, 2009 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. Link to comment Share on other sites More sharing options...
jojobojo379 Posted May 21, 2014 Share Posted May 21, 2014 Thanks, it helped me Link to comment Share on other sites More sharing options...
poornima.alex Posted August 29, 2014 Share Posted August 29, 2014 This helped my issue...Thank you very much... Link to comment Share on other sites More sharing options...
izafa.g.w.khan Posted December 18, 2017 Share Posted December 18, 2017 Thanks, it really saved my day Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now