secretinput.pp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. program secretinput;
  2. { Demo showing secret input fields }
  3. uses xforms,strings;
  4. var form : PFL_FORM;
  5. but, password1, password2, info, ret : PFL_OBJECT;
  6. str : string;
  7. begin
  8. fl_initialize(@argc, argv, 'FormDemo', nil, 0);
  9. form := fl_bgn_form( FL_FLAT_BOX,400,300);
  10. password1 := fl_add_input(FL_SECRET_INPUT,140,40,160,40,'Password 1:');
  11. password2 := fl_add_input(FL_SECRET_INPUT,140,100,160,40,'Password 2:');
  12. info := fl_add_box(FL_SHADOW_BOX,20,160,360,40,'');
  13. but := fl_add_button( FL_NORMAL_BUTTON,280,240,100,40,'Quit');
  14. fl_end_form;
  15. fl_show_form(form, FL_PLACE_MOUSE,FL_NOBORDER,nil);
  16. repeat
  17. ret := fl_do_forms;
  18. str:='Password 1 is: '+strpas(fl_get_input(password1));
  19. str:=str+' , Password 2 is: '+strpas(fl_get_input(password2))+#0;
  20. fl_set_object_label(info,@str[1]);
  21. until (ret = but);
  22. fl_hide_form(form);
  23. end.
  24. {
  25. $Log$
  26. Revision 1.3 2003-10-27 15:48:13 peter
  27. * renamed forms unit to xforms to prevent conflict with Forms
  28. from the LCL
  29. Revision 1.2 2002/09/07 15:42:57 peter
  30. * old logs removed and tabs fixed
  31. Revision 1.1 2002/01/29 17:55:02 peter
  32. * splitted to base and extra
  33. }