Only radio groups are supposed to work together. For check boxes use the
same technique you used with text fields.
> -----Original Message-----
> From: itext-questions-admin@(protected)
> [mailto:itext-questions-admin@(protected)
> Behalf Of wang yun
> Sent: Sunday, June 26, 2005 10:03 PM
> To: itext-questions@(protected)
> Subject: [iText-questions] Two Check Buttom Fields with the same name
>
> 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
>
-------------------------------------------------------
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_idt77&alloc_id492&op=click
_______________________________________________
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions