behavior: masked-edit

Single line input element behavior with mask.

Example, telephone number input element:

<input type="masked" mask="( ### ) ### - ####" />
Behavior name in CSS is behavior:masked-edit but element it applied to in intrinsic master_style_sheet is <input type=“masked”>

Elements

that have this behavior applied by default (see master style sheet):

  • <input type=“mask” /> - inline single line
  • <widget type=“mask”></widget>

Attributes

this behavior knows about:

  • value=“text” - initial value of the input element.
  • mask=“text” - input mask string. Characters with the special meaning in the string:
    • # - decimal digit position.
    • _ - alphabetic character or digit position.
    • @ - alphabetic only character position.

Events

Together with the standard set of events (mouse, keyboard, focus) behavior: button generates:

  • EDIT_VALUE_CHANGED event - value of the element was changed due to user actions. Posted (asynchronous) event.
  • EDIT_VALUE_CHANGING event - sent when value of the element is about to change. Synchronous event.

Value

type json::value::V_STRING, reflects current status of internal editing buffer.

Special key combinations

  • LEFT, CTRL+LEFT, SHIFT+LEFT, CTRL+SHIFT+LEFT
  • RIGHT, CTRL+RIGHT, SHIFT+RIGHT, CTRL+SHIFT+RIGHT
  • HOME, SHIFT+HOME
  • END, SHIFT+END
  • BACKSPACE, ALT+BACKSPACE, CTRL+BACKSPACE
  • CTRL+A
  • DELETE, SHIFT+DELETE, CTRL+DELETE
  • INSERT, SHIFT+INSERT, CTRL+INSERT
  • CTRL+X
  • CTRL+V
  • CTRL+Z
h-smile/built-in-behaviors/masked.txt · Last modified: 2007/10/15 21:51 by andrew
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0