iTextSharp.text.pdf.PdfFormField.SetFieldFlags C# (CSharp) Метод

SetFieldFlags() публичный Метод

public SetFieldFlags ( int flags ) : int
flags int
Результат int
        public int SetFieldFlags(int flags)
        {
            PdfNumber obj = (PdfNumber)Get(PdfName.FF);
            int old;
            if (obj == null)
                old = 0;
            else
                old = obj.IntValue;
            int v = old | flags;
            Put(PdfName.FF, new PdfNumber(v));
            return old;
        }

Usage Example

        /**
         * Gets a radio group. It's composed of the field specific keys, without the widget
         * ones. This field is to be used as a field aggregator with {@link PdfFormField#addKid(PdfFormField) AddKid()}.
         * @param noToggleToOff if <CODE>true</CODE>, exactly one radio button must be selected at all
         * times; clicking the currently selected button has no effect.
         * If <CODE>false</CODE>, clicking
         * the selected button deselects it, leaving no button selected.
         * @param radiosInUnison if <CODE>true</CODE>, a group of radio buttons within a radio button field that
         * use the same value for the on state will turn on and off in unison; that is if
         * one is checked, they are all checked. If <CODE>false</CODE>, the buttons are mutually exclusive
         * (the same behavior as HTML radio buttons)
         * @return the radio group
         */
        public PdfFormField GetRadioGroup(bool noToggleToOff, bool radiosInUnison)
        {
            PdfFormField field = PdfFormField.CreateRadioButton(writer, noToggleToOff);

            if (radiosInUnison)
            {
                field.SetFieldFlags(PdfFormField.FF_RADIOSINUNISON);
            }
            field.FieldName = fieldName;
            if ((options & READ_ONLY) != 0)
            {
                field.SetFieldFlags(PdfFormField.FF_READ_ONLY);
            }
            if ((options & REQUIRED) != 0)
            {
                field.SetFieldFlags(PdfFormField.FF_REQUIRED);
            }
            field.ValueAsName = vchecked ? onValue : "Off";
            return(field);
        }
All Usage Examples Of iTextSharp.text.pdf.PdfFormField::SetFieldFlags