Ejemplo n.º 1
0
		/// <summary>
		/// Create the editor control
		/// </summary>
		/// <returns></returns>
		protected override Control CreateControl()
		{
			DevAge.Windows.Forms.DevAgeTextBoxButton editor = new DevAge.Windows.Forms.DevAgeTextBoxButton();
			editor.BorderStyle = DevAge.Drawing.BorderStyle.None;
			editor.Validator = this;
			return editor;
		}
Ejemplo n.º 2
0
 /// <summary>
 /// Create the editor control
 /// </summary>
 /// <returns></returns>
 protected override Control CreateControl()
 {
     DevAge.Windows.Forms.DevAgeTextBoxButton editor = new DevAge.Windows.Forms.DevAgeTextBoxButton();
     editor.BorderStyle = DevAge.Drawing.BorderStyle.None;
     editor.Validator   = this;
     return(editor);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// This method is called just before the edit start. You can use this method to customize the editor with the cell informations.
        /// </summary>
        /// <param name="cellContext"></param>
        /// <param name="editorControl"></param>
        protected override void OnStartingEdit(CellContext cellContext, Control editorControl)
        {
            base.OnStartingEdit(cellContext, editorControl);

            DevAge.Windows.Forms.DevAgeTextBoxButton editor = (DevAge.Windows.Forms.DevAgeTextBoxButton)editorControl;
            //to set the scroll of the textbox to the initial position (otherwise the textbox use the previous scroll position)
            editor.TextBox.SelectionStart  = 0;
            editor.TextBox.SelectionLength = 0;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// This method is called just before the edit start. You can use this method to customize the editor with the cell informations.
        /// </summary>
        /// <param name="cellContext"></param>
        /// <param name="editorControl"></param>
        protected override void OnStartingEdit(CellContext cellContext, Control editorControl)
        {
            base.OnStartingEdit(cellContext, editorControl);

            DevAge.Windows.Forms.DevAgeTextBoxButton editor = editorControl as DevAge.Windows.Forms.DevAgeTextBoxButton;

            //[email protected]: Check to validate control
            if (editor == null)
            {
                return;
            }
            //to set the scroll of the textbox to the initial position (otherwise the textbox use the previous scroll position)
            editor.TextBox.SelectionStart  = 0;
            editor.TextBox.SelectionLength = 0;
        }