DekGenius.com
[ Team LiB ] Previous Section Next Section

TextBoxmarshal by reference, disposable

System.Windows.Forms (system.windows.forms.dll)class

This Control, derived from TextBoxBase, allows a user to enter and edit simple text strings.

In addition to the base functionality, it allows you to specify the alignment of the text within the control. This TextAlign property respects the right-to-left reading status of the parent. You can also force the CharacterCasing to CharacterCasing.Lower or CharacterCasing.Upper.

The base class provides an AcceptsTab property, which allows the control to receive tab keypresses from the user (and insert them into the text).

TextBox enhances this with an AcceptsReturn property to do the same for the Enter and Return keys.

A PasswordChar can obscure the text displayed for added security. Prior to Windows XP, this was typically *. On Windows XP it is \u25CF (a small round dot).

public class TextBox : TextBoxBase {
// Public Constructors
   public TextBox();
// Public Instance Properties
   public bool AcceptsReturn{set; get; }
   public CharacterCasing CharacterCasing{set; get; }
   public char PasswordChar{set; get; }
   public ScrollBars ScrollBars{set; get; }
   public override string Text{set; get; }
// overrides TextBoxBase
   public HorizontalAlignment TextAlign{set; get; }
// Protected Instance Properties
   protected override CreateParams CreateParams{get; }
// overrides TextBoxBase
   protected override ImeMode DefaultImeMode{get; }
// overrides Control
// Protected Instance Methods
   protected override bool IsInputKey(Keys keyData);  // overrides TextBoxBase
   protected override void OnGotFocus(EventArgs e);  // overrides Control
   protected override void OnHandleCreated(EventArgs e);  // overrides TextBoxBase
   protected override void OnMouseUp(MouseEventArgs mevent);  // overrides Control
   protected virtual void OnTextAlignChanged(EventArgs e);
   protected override void WndProc(ref Message m);  // overrides TextBoxBase
// Events
   public event EventHandler TextAlignChanged;
}

Hierarchy

System.Object System.MarshalByRefObject System.ComponentModel.Component(System.ComponentModel.IComponen, System.IDisposable) Control(IOleContro, IOleObject, IOleInPlaceObject, IOleInPlaceActiveObject, IOleWindow, IViewObject, IViewObject2, IPersist, IPersistStreamInit, IPersistPropertyBag, IPersistStorage, IQuickActivate, System.ComponentModel.ISynchronizeInvoke, IWin32Window) TextBoxBase TextBox

Subclasses

DataGridTextBox

Returned By

DataGridTextBoxColumn.TextBox

    [ Team LiB ] Previous Section Next Section