Exemplo n.º 1
0
        private void InsertCheckBox()
        {
            // we use an Unicode font to simulate the check box
            textControl1.Selection.FontName = "Arial Unicode MS";

            // create a new checkbox using the specific adapter field class
            FormCheckBox clsCheckBox = new TXTextControl.DocumentServer.Fields.FormCheckBox();

            clsCheckBox.Text    = UNCHECKED;
            clsCheckBox.Enabled = true;
            clsCheckBox.ApplicationField.Editable             = false;
            clsCheckBox.ApplicationField.DoubledInputPosition = true;

            // add the ApplicationField to the document
            textControl1.ApplicationFields.Add(clsCheckBox.ApplicationField);
        }
Exemplo n.º 2
0
        private void InsertCheckBox()
        {
            // create a new checkbox using the specific adapter field class
            FormCheckBox clsCheckBox = new TXTextControl.DocumentServer.Fields.FormCheckBox();
            clsCheckBox.Text = UNCHECKED;
            clsCheckBox.Enabled = true;
            clsCheckBox.ApplicationField.Editable = false;
            clsCheckBox.ApplicationField.DoubledInputPosition = true;
            
            // add the ApplicationField to the document
            textControl1.ApplicationFields.Add(clsCheckBox.ApplicationField);

            // select the inserted check box
            textControl1.Select(textControl1.Selection.Start - 1, 1);

            // we use an Unicode font to simulate the check box
            textControl1.Selection.FontName = "Arial Unicode MS";
            // remove the selection
            textControl1.Select(textControl1.Selection.Start + 1, 0);
        }