One way to do that would be to create the circular border as a second
field _behind_ (you need to call addAnnot for it before you call it for
the text field) the first one.  In JavaScript, set up actions in the
first's focus & blur events, to show/hide the second.  If you set up a
naming scheme like <fldName>__BACKGROUND, you can reuse the same scripts
across all the fields that need this feature.

On focus:
this.getField( event.target.name + "__BACKGROUND").hidden = false;

On blur:
this.getField( event.target.name + "__BACKGROUND").hidden = true;

(yes, I do a lot of JS-in-PDF too)

You could even make it toggle the visibility, and then use the same
action in both focus and blur.

That second field would be a Button field with the "icon only" style.
You then build the circle as a PdfTemplate and use that as the icon.



--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer<Cardiff> DisCard = null;
 
 

> -----Original Message-----
> From: [email protected] [mailto:[email protected]] 
> Sent: Friday, September 03, 2010 8:09 AM
> To: [email protected]
> Subject: [iText-questions] change field border to circular
> 
> hi ,my problem is that i need to create a TextField but when 
> it get focus  a circular border will appear
> 
> --
> This message was sent on behalf of [email protected] at 
> openSubscriber.com 
> http://www.opensubscriber.com/messages/[email protected]
ourceforge.net/topic.html
> 
> --------------------------------------------------------------
> ----------------
> This SF.net Dev2Dev email is sponsored by:
> 
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Buy the iText book: http://www.itextpdf.com/book/ Check the 
> site with examples before you ask questions: 
> http://www.1t3xt.info/examples/ You can also search the 
> keywords list: http://1t3xt.info/tutorials/keywords/
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.851 / Virus Database: 271.1.1/3110 - Release 
> Date: 09/02/10 11:50:00
> 

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to