home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / tot5.zip / DEMIO2.PAS < prev    next >
Pascal/Delphi Source File  |  1991-02-11  |  1KB  |  60 lines

  1. program DemoIOTwo;
  2. {demIO2 - full field input}
  3.  
  4. Uses DOS, CRT,
  5.      totFAST, totIO1, totIO2;
  6.  
  7. Var
  8.    Name: LateralIOOBJ;
  9.    Phone: PictureIOOBJ;
  10.    Price: FixedRealIOOBJ;
  11.    Keys: ControlkeysIOOBJ;
  12.    Manager: FormOBJ;
  13.    Result: tAction;
  14.  
  15. procedure InitVars;
  16. {}
  17. begin
  18.    with Name do
  19.    begin
  20.       Init(35,5,20,40);
  21.       SetLabel('Vendor Name');
  22.    end;
  23.    with Phone do
  24.    begin
  25.       Init(35,7,'(###) ###-####');
  26.       SetLabel('Tel');
  27.       SetRules(JumpIfFull);
  28.    end;
  29.    with Price do
  30.    begin
  31.       Init(35,9,8,2);
  32.       SetLabel('Unit Price');
  33.       SetValue(250.0);
  34.       SetMinMax(0.1,12250.0);
  35.       SetRules(EraseDefault);
  36.    end;
  37.    Keys.Init;
  38. end; {InitVars}
  39.  
  40. begin
  41.    ClrScr;
  42.    Screen.TitledBox(15,3,65,11,76,79,78,2,' Quicky Input Demo ');
  43.    Screen.WriteCenter(25,white,'Press TAB to switch fields and press ESC or F10 to end');
  44.    InitVars;
  45.    with Manager do
  46.    begin
  47.       Init;
  48.       AddItem(Keys);
  49.       AddItem(Name);
  50.       AddItem(Phone);
  51.       AddItem(Price);
  52.       Result := Go;
  53.       if Result = Finished then
  54.          {update the database..}
  55.       else
  56.          {call Esc routine};
  57.    end;
  58. end.
  59.  
  60.