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

  1. program DemoIOFour;
  2. {demIO4 - using hotkeys, labels, and messages}
  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 ~N~ame');
  22.       SetHotkey(305); {Alt-N}
  23.       SetMessage(22,11,'Enter the vendor''s name, 40 chars Max');
  24.    end;
  25.    with Phone do
  26.    begin
  27.       Init(35,7,'(###) ###-####');
  28.       SetLabel('~T~el');
  29.       SetHotkey(276); {Alt-T}
  30.       SetMessage(22,11,'Enter the vendor''s phone number');
  31.    end;
  32.    with Price do
  33.    begin
  34.       Init(35,9,8,2);
  35.       SetLabel('Unit ~P~rice');
  36.       SetHotKey(281); {Alt-P}
  37.       SetMessage(22,11,'Enter the unit price in dollars');
  38.    end;
  39.    Keys.Init;
  40. end; {InitVars}
  41.  
  42. begin
  43.    ClrScr;
  44.    Screen.TitledBox(15,3,65,12,76,79,78,2,' Quicky Input Demo ');
  45.    Screen.WriteCenter(25,white,'Press TAB to switched fields and press ESC or F10 to end');
  46.    InitVars;
  47.    with Manager do
  48.    begin
  49.       Init;
  50.       AddItem(Keys);
  51.       AddItem(Name);
  52.       AddItem(Phone);
  53.       AddItem(Price);
  54.       Result := Go;
  55.       if Result = Finished then
  56.          {update the database..}
  57.       else
  58.          {call Esc routine};
  59.    end;
  60. end.
  61.  
  62.