Text entry fields, Objects and listboxes

Creation and representation of objects on screen

Use case:

  1. Text entry in TextBox field
  2. Validation of entry
  3. Creation of object from entry
  4. Creation of item list that represents object

The objects themselves are stored in an array of objects: hArrObjcets AS NEW Object[]
The presentation happens with the name as string sName in a listbox lsbxObjects

Text entry

  • Jump to text box if appropiate; sequence of use in application; content has to be cleared or maintained to make a variation?
  • Text box must be writable (readonly=FALSE) and look like (writable) “entry” field; i.e. same format allover the application (e.g. “lightbackground”, or white if other layout colored)
  • Pre-fill when usefull, at least give example in tooltip.
  • Make TAB jump to next relevant field, button or other screen object.

Validation

  • Event: _KeyPress makes you check for the enter key: Key.Code = Key.Enter OR Key.Code = Key.Return
  • If so, start the validation procedure
  • If successfull, check duplicate entry (if applies): IF lsbxObjects.Find(sName) = -1
  • If ok, start procedure to add an object

Object creation

  • DIM newObject AS NEW ClassObect
  • newObject.propertyN = …; newObjectSet(…)
  • hArrObjects.Add(newObject, …)

Comments are closed.