Preview

image

  • Password field
  • Numeric only
  • Alpha-numeric only
  • Custom Cursor

Usage

// create the control
TextBox myTextBox = new TextBox(new Rectangle(50, 50, 100, 24), "Hello World");

// allow only numbers and letters to be entered
myTextBox.AlphaNumericOnly = true;

// blink '_' charackter instead of default '|'
myTextBox.CursorChar = "_";

// set our Submit key
myTextBox.SubmitKey = Keys.Space;

myTextBox.OnSubmit += (sender) => { /* submit key pressed */ };

// add control to a Window
myWindow.Controls.Add(myTextBox);

Last edited Apr 4, 2012 at 1:06 AM by qisur, version 3

Comments

No comments yet.