That's a bug/feature of Acrobat 7, it works correctly in 5 and 6 with
bt.getRadioGroup(false, false). On the other hand a radio with a single
button doesn't make much sense.

----- Original Message ----- 
From: "wang yun" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, August 14, 2005 3:18 AM
Subject: [iText-questions] How to Uncheck Radio Button


Dear Paulo,

I created a Check box and it is OK for me to uncheck
the check field. But, I want to also uncheck the radio
button, i have tried:

PdfFormField top = bt.getRadioGroup(false, false);
PdfFormField top = bt.getRadioGroup(true, false);
PdfFormField top = bt.getRadioGroup(false, true);
PdfFormField top = bt.getRadioGroup(true, true);

But, I cannot uncheck the radio button

Please give me help.

yun


here is the code:

 Document document = new Document(PageSize.A4, 50, 50,
50, 50);
 PdfWriter writer = PdfWriter.getInstance(document,
new FileOutputStream("output.pdf"));
 document.open();
 PdfContentByte cb = writer.getDirectContent();

 RadioCheckField bt = new RadioCheckField(writer, new
Rectangle(100, 700, 200, 750), "radio", "v1");
 bt.setCheckType(RadioCheckField.TYPE_CIRCLE);
 bt.setBackgroundColor(Color.cyan);
 bt.setBorderStyle(PdfBorderDictionary.STYLE_SOLID);
 bt.setBorderColor(Color.red);
 bt.setTextColor(Color.yellow);
 bt.setBorderWidth(BaseField.BORDER_WIDTH_THICK);
 bt.setChecked(false);
 PdfFormField f1 = bt.getRadioField();

 PdfFormField top = bt.getRadioGroup(true, false);

 top.addKid(f1);
 writer.addAnnotation(top);

 document.close();




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to