Jump to content
Changes to the Jaspersoft community edition download ×

How to draw border to a textfield


dgiulian
Go to solution Solved by dgiulian,

Recommended Posts

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

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

Thanks for your reply

I 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

  • Solution

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

  • 4 years later...
  • 3 months later...
  • 3 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...