Two Check Buttom Fields with the same name 2005-06-26 - By wang yun
Back Paulo,
I have no problem to create two Radio Buttons with the same name. But, I have problem to create two Check Buttons with the same time using RadioCheckField.
There is getRadioGroup but there is no getCheckGroup.
Please have a look at my code: Thanks,
yun wang
Document document = new Document(PageSize.A4, 50, 50, 50, 50); PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("output.pdf")); document.open(); RadioCheckField bt = new RadioCheckField(writer, new Rectangle(100, 100, 200, 200), "check", "v1"); bt.setCheckType(RadioCheckField.TYPE_CROSS); bt.setChecked(false); PdfFormField f1 = bt.getCheckField();
bt.setOnValue("v2"); bt.setChecked(true); bt.setBox(new Rectangle(100, 300, 200, 400)); PdfFormField f2 = bt.getCheckField();
PdfFormField top = bt.getRadioGroup(true, true); //PdfFormField top = PdfFormField.createCheckBox(writer);
top.addKid(f1); top.addKid(f2); writer.addAnnotation(top);
document.close();
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click __ ____ ____ ____ ____ ____ ____ ____ ____ ____ iText-questions mailing list iText-questions@(protected) https://lists.sourceforge.net/lists/listinfo/itext-questions
|
|