Esempio n. 1
0
        /// <summary>
        /// </summary>
        /// <param name="control"></param>
        internal void setEditControlProperties(MgTextBox control)
        {
            //fixed defect #142195
            ContentAlignment contentAlignment = Manager.GetSpecialEditLeftAlign() ? ContentAlignment.TopLeft : ContentAlignment;

            ControlUtils.SetContentAlignment(control, contentAlignment);


            //For defect #77033, it is needed that setTextProperties will be called after setting the border (pl refer
            //Fix Instructions for problem details).
            //But, this created problem for automated tests and defect #109374 was opened for the same (pl refer
            //Fix Instructions for problem details).
            //So, applying the fix for #77033 only if AllowTesting=No.
            if (GuiUtils.AccessTest)
            {
                setTextProperties(control, Text);
            }

            if ((control).BorderStyle != (_showBorder
                                          ? BorderStyle.FixedSingle
                                          : BorderStyle.None))
            {
                ControlUtils.SetBorder(control, ShowBorder);
            }

            if (!GuiUtils.AccessTest)
            {
                setTextProperties(control, Text);
            }

            GuiUtilsBase.setImeMode(control, _imeMode);
        }
Esempio n. 2
0
        /// <summary>
        ///   set the password to edit control
        /// </summary>
        /// <param name = "lg"></param>
        /// <param name = "control"></param>
        internal void setPasswordToControl(Control control)
        {
            MgTextBox textbox = control as MgTextBox;

            if (textbox != null)
            {
                ControlUtils.SetPasswordEdit(textbox, PasswordEdit);
            }
        }
Esempio n. 3
0
        /// <summary>
        ///   set all properties to text control
        /// </summary>
        /// <param name = "control"></param>
        internal override void setSpecificControlProperties(Control control)
        {
            _coordinator.RefreshNeeded = false;
            MgTextBox mgTextBox = (MgTextBox)control;

            setEditControlProperties(mgTextBox);
            ControlUtils.SetHint(mgTextBox, HintText);
            ControlUtils.SetHintColor(mgTextBox, HintForeColor);
        }
Esempio n. 4
0
 /// <summary>
 /// Strategy for TextBox with no hint
 /// </summary>
 /// <param name="mgTextBox"></param>
 public TextBoxNoHintStrategy(MgTextBox mgTextBox)
     : base(mgTextBox)
 {
 }